
an HTML page, the relationship in the structure of an HTML document between HTML elements.
An HTML document is a plain text document; it can be created both in a regular text editor (Notepad) or in a specialized one, with code highlighting (Notepad ++, Visual Studio Code, etc.). The HTML document has a .html extension.
An HTML document consists of a tree of HTML elements and text. Each element is indicated in the source document by the start (opening) and end (closing) tag (with rare exceptions).
The start tag shows where the element begins, the end tag shows where it ends. A closing tag is formed by adding a slash / before the tag name: <tag name> ... </ tag name>. Between the start and end tags is the content of the tag - the content.
Single tags cannot store content directly, it is registered as an attribute value, for example, the tag <input type = "button" value = "Button"> will create a button with the text Button inside.
Tags can be nested within each other, for example, <p><i> Text</i> </p>. When you attach, you must follow the order in which they are closed (the principle of "nested dolls"), for example, the following entry will be incorrect: <p><i> Text</p> </i>.
HTML elements can have attributes (global, applied to all HTML elements, and their own). Attributes are registered in the opening tag of the element and contain the name and value specified in the format attribute name = "value". Attributes allow you to change the properties and behavior of the element for which they are set.
Each element can be assigned several class values and only one id value. Multiple class values are written with a space, <div class = "nav top">. The class and id values must consist only of letters, numbers, hyphens, and underscores and must begin only with letters or numbers.
The browser views (interprets) the HTML document, building its structure (DOM) and displaying it in accordance with the instructions included in this file (style sheets, scripts). If the markup is correct, then an HTML page will be displayed in the browser window containing HTML elements - headers, tables, images, etc.
The process of interpretation (parsing) begins before the web page is fully loaded into the browser. Browsers process HTML documents sequentially, from the very beginning, while processing CSS and correlating stylesheets with page elements.
An HTML document consists of two sections - a heading - between the <head> ... </head> tags and a content part - between the <body> ... </body> tags.
Example
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
0 Comments