You may need to put additional comments in your stylesheet blocks. Therefore, it is very easy to comment any part of the style sheet. You can simply put your comments inside /*.....this is a comment in style sheet.....*/.You can use /* ....*/ to comment multi-line blocks in a similar way you do in C and C++ programming languages.Let us see how to add a comment:
p {
color: red;
/* This is a single-line comment */
text-align: center;
}
/* This is a multi-line comment */
Hello World!
The following is the rule to override any Style Sheet Rule.Any inline stylesheet takes the highest priority. Therefore, it will override any rule defined in ... tags or rules defined in an external style sheet file.Any rule defined in ... tags will override rules defined in any external style sheet file.Any rule defined in external style sheet file takes the lowest priority, and rules defined in this file will be applied only when above two rules are not applicable
The element can be used to include an external style sheet file in your HTML document.An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using element.Consider a simple style sheet file with a name new.css having the following rules:h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}Now you can include this file new.css in any HTML document as follows:
You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax:The following is an example:
This is inline CSS