HTML Style Tag
Reference on the HTML Style Tag. Including its useful example, and a list of the allowed attributes.
The Style Element is used to embed, or load external styling rules, such as CSS StyleSheet. These rules are used to control the appearance and layout of a page.
Attributes
| Attribute: | Value: | Description: |
| Attrs | Other Attributes | I18n |
| type | Content Type | The Content Type of the scripting language used. |
| media | Media Descriptor | Either a single, or comma-separated list. I.e. "screen,print" |
| title | Text | Advisory title |
Example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>My first Website</title>
<style type="text/css">
h1 {color:#0000FF;}
p {font-size:2em;}
</style>
</head>
<body>
<h1>My first use of Style</h1>
<p>Using CSS to change the style of headings and paragraphs</p>
</body>
</html>