Saturday, January 14, 2012

Including an Embedded Style Sheet

By Richard York

You use the tag set to include embedded style sheets directly in the document. You can include HTML comment tags if you want to hide style sheet rules from non-equipped browsers. Since HTML’s early days, HTML has supported the capability of adding comment text to a document. Comment text gives the web author the ability to add notes to a project so he can recall why he did something in a certain way or to mark the sections of a document. In HTML, you add a comment by typing a left angle bracket, an exclamation mark, two dashes, at least one space, and then the comment text itself. You close the comment by typing at least one space, two more dashes, and the right angle bracket. Here’s what a comment looks like:

In the context of an embedded style sheet, comments have a special meaning. Because they appear inside the tags, they tell browsers that don’t support CSS to ignore the text that appears between them. Modern CSS-equipped browsers, on the other hand, read the sequence of
Older browsers simply ignore any CSS rules defined inside the HTML comments.
For the
Post a Comment