HTML - <style> tag


Advertisements


Function

The HTML <style> tag is used for declaring style sheets within the head of your HTML document.

Difference between HTML and XHTML

NONE

Example

<head>

   <style type="text/css">
      h1 { color:#F1F1F1 }
   </style>

</head>

For more detail on <style> tag please check HTML Styles chapter.

Attributes

Attribute Value Description
type text/css Specifies the style sheet language as a content-type (MIME type).
media screen
tty
tv
projection
handheld
print
braille
aural
all
Specifies the device the document will be displayed on.

Standard Attributes

Sr.No Attribute & Description
1 dir

Specifies the direction of the text

2 id

Document wide identifier

3 lang

Sets the language code.

4 xml:space

Sets the language code.


html_tags_reference.htm

Advertisements