0
3.8kviews
What is CSS? Explain the ways by which CSS included in HTML.
1 Answer
written 6.3 years ago by | • modified 6.2 years ago |
selector {1st property: value; 2nd property: value;......Nth property: value}
<h1>,<p>
.A property is a type of attribute of HTML tag like color, border etc. and Values are assigned to properties eg. red is value for color property.Example:
<head>
<style type="text/css">
p {color:red; font-size: 10px;}
</style>
</head>
Advantages of Internal CSS:
Disadvantages of Internal CSS:
<LINK>
tag instead of <STYLE>
tag to link with web pages. The <LINK>
tag is placed in the <HEAD>
section of the HTML document.<link>
tag has following attributes such as 'rel' to specify a relationship of CSS with HTML document,' type' it specifies which type of style language is used, 'href' points to the external style sheet file's URL.Example:
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
Advantages of External CSS:
Disadvantages of External CSS:
<style>
attribute is used to style a particular HTML tag. It will affect only single elements.Example:
<body style="background-color:black;">
<p style="color:white;">Something useful here.</p></body>
Advantages of Inline CSS:
Disadvantages of Inline CSS: