Html5 layout and html5 Layout
Before Html5, Div + css is used for layout, but it is related to developers' naming methods and preferences. In the new Html5, the layout is more user-friendly and easier to understand. If the Header, Footer, Section, and Aside labels are added, the corresponding functions are easily known at a glance. The layout effect is as follows:
The elements involved are described as follows: the new semantic elements provided by HTML5 define different parts of the web page:
HTML5 semantic elements
Header |
Define the header of a document or Section |
Nav |
Container that defines the navigation link |
Section |
Define sections in the document |
Article |
Define independent self-contained articles |
Aside |
Define content other than content (for example, sidebar) |
Footer |
Define the footer of a document or Section |
Details |
Define additional details |
Summary |
Define the title of the details Element |
Specifically, the Html code for layout is as follows:
1 <! DOCTYPE html> 2 View Code