search

Home  >  Q&A  >  body text

html5中的语义元素是什么意思?

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

巴扎黑巴扎黑2773 days ago956

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 13:26:07

    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

    reply
    0
  • 阿神

    阿神2017-04-17 13:26:07

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

    See the documentation: html5

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:26:07

    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

    reply
    0
  • 阿神

    阿神2017-04-17 13:26:07

    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

    reply
    0
  • Cancelreply