html section

Html section

An HTML document consists of several sections, each with a specific purpose and structure. The main sections of an HTML document are:


  • <doctype>: 

The< doctype> declaration defines the version of HTML being used in the document. This is the first line of an HTML document.


  • <html>:

 The <html> element is the root element of the document, and it contains all other elements on the page.


  • <head>: 

The <head> element contains information about the document that is not displayed in the browser window. This includes the title of the document, which is displayed in the browser's title bar, as well as metadata such as keywords and descriptions for search engines.


  • <body>: 

The <body> element contains all the content that is displayed in the browser window. This can include text, images, links, and other elements.


  • <header>: 

The <header> element is used to define a header section for the document or a specific section within the document. It typically contains a logo, site navigation, and sometimes the main heading of the page.


  • <div>: 

used to group large group of HTML elements like navigation, header,

main content, footer, images: it is a block-

level element.


  • <span>: 

used to group smaller group of text in a paragraph and few HTML elements; it is an inline element.


  • <nav>: 

The <nav> element is used to define a section of the document that contains navigation links.


  • <main>: 

The <main> element is used to define the main content of the document, excluding content that is repeated across a set of pages such as headers and footers.


  • <article>: 

The <article> element is used to define a self-contained composition, such as a blog post or a news article, that can be independently distributed or syndicated.


  • <section>: 

The <section> element is used to define a section of the document, such as a chapter or a tabbed content area.


  • <aside>: 

The <aside> element is used to define content that is tangentially related to the main content of the document, such as a side column or a pull quote.


  • <footer>:

 The <footer> element is used to define a footer section for the document or a specific section within the document. It typically contains copyright information, links to related pages, and contact information.