HTML5 main label how to center? The center example of the main tag is introduced

Source: Internet
Author: User
This article mainly introduces the center of the HTML5 main tag, which has a complete example of the use of the main tag, so let's take a look at the introduction of the HTML5 main tag here.

First, let's take a look at how the HTML5 main tag is centered:

<main> tags specify the main content of the document.

The content in the <main> element should be unique to the document. It should not contain content that recurs in a document, such as a sidebar, navigation bar, copyright information, site logo, or search form.

Note: In a document, more than one <main> element cannot appear. The <main> element cannot be a descendant of the following elements:<article>, <aside>, <footer>,

So much for the definition, look at the center of the main tag, the complete code example:

<!doctype html>

I added a align attribute to the main tag, meaning to have the entire document aligned in the middle to see the effect shown in the browser:

Can be very clear to see, because the size of the article, can not put too much of the page, only narrow, but still can very clearly see these pictures in the middle of the text.

OK, this article to the end of this (want to learn more about topic.alibabacloud.com, Baidu search topic.alibabacloud.com, which have you want programming courses and materials), there are problems can be asked under the question

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.