HTML 5 <head> tag
Definition and Usage
The head element can contain information about the document. The browser
does not display the "head information" to the user. The following
tags can be in the head section: <base>, <link>, <meta>,
<script>, <style>, and <title>.
Differences Between HTML 4.01 and HTML 5
The profile attribute is no longer supported in HTML 5
Tips and Notes
Always specify a title for the document!
Example
Source |
<html> <head>
<title>Title of the document</title>
</head>
<body>
...
...
...
</body>
</html> |
Attributes
- 4: indicates if the attribute is defined in HTML 4.01
- 5: indicates if the attribute is defined in HTML 5
Attribute |
Value |
Description |
4 |
5 |
profile |
URL |
A space separated list of URL's that contains meta data information
about the page |
4 |
|
Standard Attributes
class, contenteditable, contextmenu, dir, draggable, id,
irrelevant, lang, ref, registrationmark, tabindex, template, title |
For a full description, go to Standard
Attributes in HTML 5.
Try-It-Yourself Demos
The title of a
document
The title information inside a head element is not displayed in the browser
window.
One target for all
links
How to use the base tag to let all the links on a page have the same target.
Styles in HTML
How to format an HTML document with style information added to the <head>
section.
Link to an
external style sheet
How to use the <link> tag to link to an external style sheet.
Document
description
Information inside a meta element describes the document.
Document
keywords
Information inside a meta element describes the document's keywords.
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|