What is the difference between HTML tags
and ?

后端 未结 13 1293
时光取名叫无心
时光取名叫无心 2020-11-22 05:48

I would like to ask for some simple examples showing the uses of

and . I\'ve seen them both used to mark a section of a pa
13条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 06:10

    is a block-level element and is an inline element.

    If you wanted to do something with some inline text, is the way to go since it will not introduce line breaks that a

    would.


    As noted by others, there are some semantics implied with each of these, most significantly the fact that a

    implies a logical division in the document, akin to maybe a section of a document or something, a la:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis congue vehicula purus.

    Nam eget magna nec sapien fringilla euismod. Donec hendrerit.

提交回复
热议问题