html ... ⁄html
HTML5 html element
The html element is the root element. »video
About html
- the html element is optional unless ...»details
- only 1 html element allowed per HTML5 document, right after the doctype declaration »examples
Display & support html
- display in browser »video
- display type: block





Parents, children html
- html nested within elements »html parents
- elements nested within html »html children
»examples
Attributes html
- required: none
- optional: specific attributes, global attributes, event attributes
Syntax html
1 2 3 4 | <> ... <⁄> <> ... ... <⁄> ... » video |
Attributes and Values html (comma separated)
< | attribute | = | "attribute_value(s)" | > | Video | Examples |
---|---|---|---|---|---|---|
1. specific attributes | ||||||
1. | manifest | = | manifest file url | » video | <manifest="test.appcache"> ... <⁄ > <manifest="http://site.com/test.appcache"> ... <⁄ > | |
All Specific Attributes | ||||||
2. global attributes | ||||||
1. | accesskey | = | keyboard key | »img | <accesskey="h"> ... </ > | |
2. | class | = | class name | »html »img | <class="class_name"> ... </ > | |
3. | contenteditable | = | "", , true, false | »html | <contenteditable="true"> ... </ > | |
4. | contextmenu | = | menu id value | »html | <contextmenu="menu_id_value"> ... </ > | |
5. | data-* | = | value | - | <data-http-error="404"> ... </ > | |
6. | dir | = | ltr, rtl, auto | »html | <dir="ltr"> ... </ > | |
7. | draggable | = | true, , false | »img | <draggable="false"> ... </ > | |
8. | dropzone | = | copy, move, link, string:, file: | - | <dropzone="copy"> ... </ > | |
9. | hidden | = | "", , hidden | »html »img | <hidden="hidden"> ... </ > | |
10. | id | = | id name | »html »img | <id="unique_id_name"> ... </ > | |
11. | itemid | = | URL | - | - | |
12. | itemprop | = | string | »link »a | - | |
13. | itemref | = | string | - | - | |
14. | itemscope | = | "", , itemscope | - | - | |
15. | itemtype | = | absolute URL | - | - | |
16. | lang | = | language code | »html »head»title »img | <lang="en"> ... </ > | |
17. | spellcheck | = | "", , true, false | »html | <spellcheck="true"> ... </ > | |
18. | style | = | CSS property:value | »html »img | <style="color:red"> ... </ > | |
19. | tabindex | = | integer | »img | <tabindex="3"> ... </ > | |
20. | title | = | text | »html »link»style »abbr»dfn »img »meter | <title="html page"> ... </ > | |
21. | translate | = | "", yes, no | »html »img | <translate="yes"> ... </ > | |
All Global Attributes | ||||||
3. global event attributes | ||||||
1. | onclick | = | script | » list | <onclick="script" > ... | |
2. | ondblclick | = | script | » list | <ondblclick="script" > ... | |
All Event Attributes |
Video demonstration html element
HTML5 html root element, Tutorial
min | video details |
---|---|
00:02 | open the html file in Notepad++ |
00:05 | html - represents the root element - the main container for all HTML elements, except the doctype declaration |
00:14 | all html elements, except doctype declaration, must be placed inside it (html = main container) note: as direct descendants (= children) accepts only 2 elements: and , those 2 containing all other html elements |
00:22 | launch file in browser |
00:27 | entering 3d View mode (shortcut CTRL+Shift+I) |
00:36 | zooming in the 3D representation of our index.html file |
00:38 | in 3D mode we can understand better why the element is considered the root element |
00:42 | mark element: - in source code: is placed inside p element; - in 3D view: is placed on p element; |
00:47 | p element: - in source code: is placed inside body element; - in 3D view: is placed on body element; |
00:55 | body element: - in source code: is placed inside html element; - in 3D view: is placed on html element; |
01:03 | html element: - in source code: is placed right after the doctype declaration ; - in 3D view: is at the root (base) of all other html elements; |