CSS Positioning, Reading Order, and Navigation Links
The <div> element is similar to the <span> element in that the only reason it exists is to allow designers to associate styles with chunks of material. But the chunks that the <div> element works with are generally bigger. The <div> element is a block-level element, meaning that it can encompass a variety of other elements, including paragraphs, tables, lists, other <div> elements, and so on. By contrast, the <span> element is an inline element, meaning that it always ropes off a “span” inside another element—part of a paragraph, part of a table row, part of a label, and so on.
The <div> element is also an important tool for using CSS to position elements on the screen—to take them out of ...
Get Maximum Accessibility: Making Your Web Site More Usable for Everyone now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.