HTML - HTML element (Document root)


The html 1) element represents the root of a a html document (page).

It would become also the root (top node) in the in-memory tree representation (DOM document) of this html page.


This is also the node where all default sizing related styling are set such as:

normalize stylsheets applies their rule on it.

Why ? Because of CSS inheritance and because this is the top node, all descendant nodes inherit also this default values.


With javascript, you can get the Html DOM element via the documentElement property.


console.log("The name of the documentElement is "+document.documentElement.localName);

Discover More
Browser - Document variable (DOM) - Javascript

In a browser, the document is: a DOM document (in-memory tree) of a XML document (generally a HTML dom document) The document is provided by the browser via its DOM webapi (Not by the Javascript...
CSS - Block Level (element|box)

Block-level refers to the (HTML) elements that are formatted visually as blocks. See for more information: Except for table boxes, and replaced elements, a block-level box can also be a block container...
CSS - Rem (Root Emphemeral Unit)

rem is a length unit that is based in the the font-size of the root element of the document. To write style rules that is constant throughout the document, use the rem rem stands for root em (ie root...
CSS - line-height Property

On block level elements, the line-height property specifies the space between the text lines and is known as the Leading where: the value is one of: normal, - let the browser choose a reasonable...
DOM - Hierarchy

The nodes in the node tree have a hierarchical relationship to each other. An element A is said to be preceded or followed by a second element B if A and B have the same parent node and there are...
DOM - Root Node of the document

The root Node is the root of the document tree. in html, this the HTML element in xml, this the XML element in svg, this the SVG element ... absolute positioning Node Type
HTML - Accelerated Mobile Pages (AMP)

The AMP Project speeds up web pages on mobile devices AMP HTML is a subset of HTML for authoring content pages such as news articles in a way that guarantees certain baseline performance characteristics....
HTML - Attribute

HTML An attribute in HTML is an XML attribute of an HTML element Attribute names are TR/html-markup/documents.htmlcase-insensitive. Classes and IDs are attributes used in the selection of element....
HTML - Body element

The body element represents the body of a document (as opposed to the document’s metadata). The document property document.body returns the body element. Can be set, to replace the body element....
HTML - Character

This page is character in HTML If you want to show a character that is: not accessible via your keyboard or that is a reserved characters, not part of the defined character set you can use the...

Share this page:
Follow us:
Task Runner