HTML style Tag
The information on this page is based on HTML version 4.01 (which is the current version of HTML). The next version, HTML 5, is currently being written. Here's a list of HTML 5 tags.
The HTML <style> tag is used for declaring style sheets within the head of your HTML document.
Each HTML document can contain multiple <style> tags. Each tag must be located between the <head> tags.
In HTML 5, the <style> tag can be used outside of the <head> tags as long as it contains the scoped attribute.
| Example |
<head>
<style type="text/css">
h1 { color:#000099 }
</style>
</head>
|
| Attributes: |
| Attributes specific to this tag: |
| Attribute | Description |
| name | Defines the name of the parameter. |
| type | Specifies the style sheet language as a content-type (MIME type). |
| media | Specifies the device the document will be displayed on. Possible values:- all
- braille
- print
- projection
- screen
- speech
|
| Other Attributes: |
| Attribute | Description |
| dir | Specifies the direction of the text |
| lang | Language code |
| title | Specifies a title to associate with the element. Many browsers will display this when the cursor hovers over the element (similar to a "tool tip"). |
|
| Try it yourself! |
|
Also see the HTML 5 version of HTML tags
Enjoy this page?
-
- Link to this page (copy/paste into your own website or blog):
- Link to Quackit using one of these banner ads.
Thanks for supporting Quackit!