HOME
            About US
            Contact Us
            Book     Book Preface

Class html

2.4- Class html & 2.5- Comments    


2.4- Class: This is a further definition inside an element. E.g. Let us say that, we are having 4 paragraphs in our web page and we want to give a different look to the different paragraphs. In this case in our 'style sheet' we will define a class and in HTML the corresponding command will be

<p class='new1'>
Your content
</p>

<p class='new2'>
Your content
</p>

Now your both the paragraphs will be having different look. In Style Sheet the class 'new1' and 'new2' will be having different decorations (for style sheet command refer chapter 14.1 and 14.2 and return for further reading). The class can be used with other element like Heading also.




2.5- Comments: Generally the web browser does not use its own judgment and tries to display all the text written in HTML file (other than the command / tags written between '<' and '>'). Therefore any comments (which should not be displayed) are to be written between comment tags. You may add your comments in the file for future reference to understand. The comments are ignored by browser and not displayed. The tag starts with '<!--' and ends with '-->'

<!-- write your comment -->


html
© funandhobby.com (Class html)