div and span

Where other HTML elements such as

(paragraph), (emphasis), and so on, accurately represent the semantics of the content, the additional use of and

tags leads to better accessibility for readers and easier maintainability for authors.

The elements allow semantic attributes (e.g. lang="en-US"), CSS styling (e.g., color and typography), or client-side scripting (e.g., animation, hiding, and augmentation) to be applied.

[1][2]

defines a 'division' of the document, a block-level item that is more distinct from elements above and below it than a span of inline material.

It still serves that general purpose, although a much richer range of semantic elements have been defined since then, and there are also many more attributes that may need to be applied.

The

block visually isolates a section of a document on the page, and may contain other block-level components.

Even today's search engines such as Google and others use proprietary information processing algorithms of considerable complexity.

Once the HTML or XHTML markup is delivered to a page-visitor's client browser, there is a chance that client-side code will need to navigate the internal structure (or Document Object Model) of the web page.

When the new text arrives back from the server, the JavaScript must identify the exact region on the page to replace with the new information.

Automatic testing tools also may need to navigate web page markup using and

elements' class or id attributes.