Head
Talk8this wiki
| Head | |
| Basic usage: | |
| |
| Spec version | 1.0 |
| IE Version | 1.0 |
| Firefox | 1.0 |
| Google Chrome | 1.0 |
| Safari | 1.0 |
| Opera | 1.0 |
| Example output: | |
| See the top of your browser window. | |
The HTML <head> element contains the page's title and description, and some optional scripts and styles. It is usually placed right after the opening <html> tag and right before the opening <body> tag. <Title> is always inserted first within the head. To apply CSS directly into an HTML document, you must insert the code in the <head> section (or at the very beginning of the <body>) for it to work.
Contents |
Attributes
Edit
HTML 4 attributes
Edit
Internationalization attributes lang and dir.
| Attribute | Value | Description |
|---|---|---|
| profile | URL | Specifies some meta data profile location(s), separated by white space. Obsolete in HTML5[1]. |
HTML5 attributes
Edit
Usage
Edit
To apply this is an HTML document, use:
<html> <head> <title>The title</title> Head content </head> <body> Body content </body> </html>
To use internal CSS in the <head> tag, use:
<html> <head> <title>The title</title> <style type="text/css"> h1 { background-color:black; color:white; } </style> </head> <body> Body content </body> </html>
Rendering
Edit
The <head> element defines document properties, and is by itself not visible.
Typical CSS representation:
head { display: none; }
Coding rules
Edit
The <head> element is the first child element of the <html> element. It must contain a <title> element, can contain an <isindex> and an <base> element, and can contain several <script>, <style>, <meta>, <link> and <object> elements.