Course Content
Ultimate HTML
Ultimate HTML
Structure
An HTML document looks like a tag tree. The next set of following tags represents the bare minimum required for any HTML document and serves as its foundation, similar to the foundation of a house.
Document type declaration
<!DOCTYPE >
is not considered a tag but a mandatory declaration specifying the document type and version. This declaration is necessary for the browser to correctly interpret and render the HTML document.
Based on the doctype, the browser can display the page correctly. The document-type declaration must be the first thing the browser meets when working with an HTML document.
Top-level Elements
Top-level Elements are designed to establish the fundamental structure of a webpage and identify the document's head and body sections.
tag
The root element of an HTML document is the <html>
tag, which serves as a container for all the content on the page. It is the first tag that appears in an HTML document and defines the beginning and end of the document's HTML code. Anything outside the <html>
tag is not recognized as HTML code by the browser and is not processed. The attribute lang
is used to identify the language of text content.
tag
An HTML document's <head>
tag contains metadata for the web page, such as the page's heading, description, encoding, etc. This information is not visible in the browser window. However, it instructs the browser on processing and displaying the page.
tag
The <body>
tag contains all the visible content of a web page, such as text, images, links, and multimedia. It is the main section where website authors add the content users see in the browser window.
Thanks for your feedback!