In the HTML5 specification, tags such as <header><nav><footer><article> are actually <p>, and the purpose of these new tags is to better divide the overall HTML document display logical structure. For example, in the <header> tag only Defining content related to the top of the page, rather than defining the top of the page as a <p class="header">, is the main difference between these tags and <p>.
As far as I have discovered, the tags of many websites are still xhtml, and there are still very few new tags for h5, which may be from the past. But I have to say that many people still like to use xhtml standards to write . What is the reason?
I think:
Even though h5 has been launched for a few years, many people still like or feel that things written in xhtml already meet the needs of writing websites and meet the standards (easier to understand), and the new h5 has made There are some changes, but many people still fail to learn quickly
To completely change the old version of the webpage to h5, it will take a certain amount of time and effort
H5 is compatible with various browsers. Although most modern browsers already support h5, we still have to consider the compatibility issues with lower versions of some browsers
In the HTML5 specification, tags such as
<header><nav><footer><article>
are actually<p>
, and the purpose of these new tags is to better divide the overall HTML document display logical structure. For example, in the<header>
tag only Defining content related to the top of the page, rather than defining the top of the page as a<p class="header">
, is the main difference between these tags and<p>
.is a block element. The typical behavior of block elements is to occupy one line alone. Style is controlled by class
Yes,
can also be selected directly using the element selector:
Several new HTML5 tags such as
<header><footer><nav><section> are all block tags.
You can write code to see whether the effect will automatically fill a row!
As far as I have discovered, the tags of many websites are still xhtml, and there are still very few new tags for h5, which may be from the past. But I have to say that many people still like to use xhtml standards to write . What is the reason?
I think:
Even though h5 has been launched for a few years, many people still like or feel that things written in xhtml already meet the needs of writing websites and meet the standards (easier to understand), and the new h5 has made There are some changes, but many people still fail to learn quickly
To completely change the old version of the webpage to h5, it will take a certain amount of time and effort
H5 is compatible with various browsers. Although most modern browsers already support h5, we still have to consider the compatibility issues with lower versions of some browsers