HTML 5 <html> tag
Definition and Usage
This element tells a browser that this is an HTML document.
Differences Between HTML 4.01 and HTML 5
HTML 4.01 had an xmlns attribute, which was required in XHTML. This really
had no effect in HTML 4.01, but was useful while converting from HTML to XHTML,
for validational reasons. In HTML 5 there is no reason to do this, but you can define the xmlns attribute
with the value "http://www.w3.org/1999/xhtml".
HTML 5 has a new attribute: manifest
Tips and Notes
Note: If you, for some reason, wish to define the xmlns attribute, the
ONLY legal value is "http://www.w3.org/1999/xhtml"
Example
<html>
<head>
</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 |
manifest |
url |
Defining cache information for offline use |
4 |
5 |
xmlns |
http://www.w3.org/1999/xhtml |
Defines the XML namespace attribute. Do not use this
attribute in HTML 5 |
4 |
5 |
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
A very simple HTML
document
A very simple HTML document, with only a minimum of HTML tags. It demonstrates
how the text inside a body element is displayed in the browser.
|
|
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).
|
|