content logo

Learn HTML:

Html style tag

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

Example

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

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

Attribute Description
dir Specifies the direction of the text
id Document wide identifier
lang Sets the language code.
xml:space Sets the language code.
#

HTML Style Example

#

HTML Style Code

#

HTML Style Tutorial