(Site Identification)

'Eye' Focus: Web Support Tutorials

Style Sheets: Embeded

With embedded use of Style Sheets we place all Style Sheet information at the top of the page. This is separated from the <body> of the page: (skip code)

<html lang="en"><head>
<title>Embedded Style Sheet</title>
<style title="css" language="Style Sheet" type="text/css"><!--
h1 {color:#55bb55; font-size:22px; font-style:italic; font-family:arial;}
p {text-indent:1.5cm; background-color:cyan; font-family:times,serif;}
--></style>
</head><body bgcolor="#ffffff" text="#000000">

<h1>Style Sheets</h1>
<p>Customizing your web pages!</p>

</body></html>


Resulting in:

Style Sheets

Customizing your web pages!


The type="text/css" specifies the browser MIME type. Then, browsers that don't support CSS can ignore the Style Sheet code altogether. Use this for best compatibility.

The comment tag, starting with <!-- and ending with -->, are more important. Some browsers will still attempt display the Style Sheet code itself without the comment tag. Not good! Comments prevent this problem.


[Updated: Sunday, November 18, 2007]