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