Continue

 Commenting Style Sheets

Though you will learn using style sheets with HTML in a separate tutorial, but here your must make a note that if you are using Cascading Style Sheet (CSS) in your HTML code then it is recommended to put that style sheet code inside proper HTML comments so that old browsers can work properly.


Example

<!DOCTYPE html>

 <html>

<head>

<title>Commenting Style Sheets</title>

<style>

<!--

.example {


border:1px solid #4a7d49;}

//-->

</style>

</head>

<body>

<div class="example">Hello, World!</div>

</body>

</html>


This will produce the following result:

Hello, World!

Comments

Popular Posts