Home > front end >  Inline elements and block-level elements
Inline elements and block-level elements

Time:10-08

Common inline elements and block-level elements:

1, inline elements: a, span, strong, b, em, I, label, (img, textarea, button, imput, select) line block-level elements, can be set high, wide non-breaking,

2, block level elements: div, p, the pre, h1 ~ h6, ul - li, ol - li, dl - - dd dt, the form, the body, table, menu.

One strong/b: bold, strong logical elements, with emphasis on meaning, and b is a physical element, just style bold;

Em/I: italics, em is a logic element, I is a physical element;

For search engines, and pay more attention to logical elements, which is beneficial to SEO,



The general format, ignore extra carriage returns and Tab, space,

 Formatted text, keep all Spaces, carriage returns, and Tab, commonly used in writing code or poetry, 

Ul - li, ol - li, dl - dt - dd
Ul - li is unordered list, front is the origin;
Ol - li is an ordered list, the front is a sequence of Numbers;
Dl - - dd dt semantic

Title & lt;/dt>
Content 1 & lt;/dd>
Content 2 & lt;/dd>

  • Related