Monday, November 19, 2007

How to work with embedded the Style Sheets in HTML

How to work with embedded the Style Sheets in HTML

To work with embedded the Style Sheets in HTML

Cascading style sheets are embedded in the HTML using the tag. This tag has a TYPE attribute; its value is set to "text/css" by default. TYPE="text/css" tells the browser to interpret any formatting instructions enclosed in the tag as a CSS1 style sheet and build the screen display according to the rules specified within. Although CSS1 is the predominant style sheet mechanism currently in use on the Web, this type description may reduce conflicts with future style sheet mechanisms on the Web.

The following is an example of a basic, yet complete style sheet:

You’ll notice that the rules are enclosed in HTML comment tags. These tags instruct browsers that are unaware of the style tag to ignore the tags (unknown tags are ignored).


No comments: