码迷,mamicode.com
首页 > Web开发 > 详细

html element and list

时间:2020-06-05 21:12:41      阅读:89      评论:0      收藏:0      [点我收藏+]

标签:concepts   school   cup   tps   pts   poi   play   numbers   nested   

  • Block element

    Block elements, or block-level elements, have a rectangular structure. By default, these elements will span the entire width of its parent element, and will thus not allow any other element to occupy the same horizontal space as it is placed on.

  • Inline element

    Inline elements cannot be placed directly inside the <body> element; they must be wholly nested within block-level elements.

cite from WIKIPEDIA

from the above concepts, the difference between block element and inline element is whether it auto break line. it could change with attribute [display].

list: <li>  tag defines a list item. it used in **ordered lists**, **unordered lists** and in **menu lists**

- ordered list: <ol>
- unordered list: <ul>
- menu list: <menu>

<li> tag defines a list item. 

In <ul> and <menu>, the list items will usually be displayed with bullet points.

In <ol>, the list items will usually be displayed with numbers or letters.

**Tip:** Use CSS to [style lists](https://www.w3schools.com/css/css_list.asp).

[cite from w3school](https://www.w3schools.com/tags/tag_li.asp)



description list: <dl>

The `<dl>` tag defines a description list.

example:
<dl>
 <dt>Coffee</dt>
 <dd>Black hot drink</dd>
 <dt>Milk</dt>
 <dd>White cold drink</dd>
</dl>


html element and list

标签:concepts   school   cup   tps   pts   poi   play   numbers   nested   

原文地址:https://www.cnblogs.com/fbss/p/13051557.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!