html5中的语义元素是什么意思?
巴扎黑
巴扎黑 2017-04-17 13:24:07
0
4
974

是不是就像p一样,可以通过样式定义,默认是空的?
比如把做好的导航条放到<section>里也是可以的吧?计算机会不会识别出来?
比如把(nav)放到<footer>是不是也可以?虽然不合逻辑,但是没问题?

巴扎黑
巴扎黑

reply all(4)
Peter_Zhu

Some HTML elements have meanings and represent what they are used for. When search engines search, they will judge what your website has based on the meaningful elements in your website, and what specific elements are meaningful. What do the tags represent? You can check out the list of HTML5 tags on MDN

阿神

It’s not painful, it’s just that there are a few more things (some new elements, some new APIs):

See the documentation: html5

Ty80

Semantic elements mean that you can know the meaning of the content they represent by just looking at the element name
For example, for an article, there are page headers, table of contents, page numbers, footers and other information
If expressed by semantic elements:

<article>
    <header></header>
    <catalog></catalog >
    <content></content>
    <footer></footer>
</article >

Of course you don’t need these, you can also express it directly by using p etc.
This information is particularly useful for search engines, which can directly extract the article content by analyzing page elements

阿神

Tags like

p can be used to define styles. Semantic tags are easy to read and can be easily parsed by browser crawlers and machines. It is best not to nest them randomly

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template