DIV list elements commonly used in CSS web layout ul ol li dl dt dd explanation, block-level elements div should be used as little as possible. Like table, the less nested the better
ol ordered list.
<ol>
<li>……</li>
<li>……</li>
<li>……</li>
</ol>
Performance:
1......
2…
3…
ul unordered list, shown as li is preceded by a big dot instead of 123
<ul>
<li>……</li>
<li>……</li>
</ul>
Many people tend to ignore the usage of dl dt dd
dl content block
dt the title of the content block
The content of dd can be written like this:
<dl>
<dt>Title</dt>
<dd>Content 1</dd>
<dd>Content 2</dd>
</dl>
ol ul li and p can be added to dt and dd
After understanding these, it will be much more convenient when using div layout. W3C provides many elements to assist layout.
It is recommended not to use height (height) and line-height (line-height) for the settings of dl, dt, and dd. It will cause misalignment in FF. Due to whether IE and FF are adaptive, it is recommended to use the padding attributes of dt and dd for positioning!