How do we display the main content in the document in HTML5?

To display the main content in the document, we use

tag. The
tag consists of open and closing tags, the content present in between
element is unique to the document, it does not contain any content which is repeated across documents like navigation links, site logos, sidebars and search forms.

In a document there should be only one

element. The main is not a descendent of

The

tag supports almost all browsers and it also supports global and event attributes.

Syntax

Following is the usage of

tag in HTML ?

??..

Example

Following example demonstrates how to display the main content of document.




   

Learning

Learn to gain experience and try to share your knowledge with others.

Web Development Tutorials

Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.

Academic Tutorials

Consist of Computer Fundamental, Computer Network tutorials for 1st Semester exams.

The
tag in HTML5

In the above example, we used

tag which is placed in between opening and closing of
tags. The
tag is used to represent an article; it is new sectioning element in HTML5.

The content within

tag is independent when compare to other content of the site. or it represents the component of a page which consists of self-contained composition in a page, site or document.

Example

Following example explains the usage of

tag in HTML5 -




    Display the main content of a document using HTML5 


   

TutorialsPoint

tutorials

TutorialsPoint

Tutorials Point is a leading Ed Tech company striving to provide the best learning material on technical and non-technical subjects.

Example

Let?s see another example display the main content in the document using

and
tags -




   


   

Displaying main content in document by applying CSS

Popular Web Development Languages

HTML, JavaScript, and Angular are the most used Web Development Language

HTML

HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages. HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTML specification which was published in 1995.

JavaScript

JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complimentary to and integrated with Java. JavaScript is very easy to implement because it is integrated with HTML. It is open and cross-platform.

Angular

Angular 8 is an open source, TypeScript based frontend web application framework. Angular 8 has been released by Google?s Angular community.

Updated on: 2023-10-10T13:06:01+05:30

348 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements