The answer to that is simply to convey information and to structure your document.
When you use spans and divs, you document does not have a structure. There is no lists, no paragraphs, no tables, no hyperlinks. Nothing. There is really no point to choose HTML as a markup language and then ignore the vocabulary it offers to express and structure your content. Structure is the important word here btw. HTML is for structuring not displaying. That's what CSS is for.
If you markup your code semantically, you are giving human readers as well as machines a chance to understand the data inside your elements. If you use span and div elements all the way, you will not have this extra information and inferring them from the values alone might not be possible.
Likewise, if I want to scrape websites and only extract the headings to create Table of Contents for them, my spider would need to know what the heading are. It cannot do that without the appropriate elements.
Last but not least, if you use divs and spans only, you will have a hard time styling these with CSS. CSS Selectors work on the structure of your document and if that is mostly ambiguous structure, CSS rules get iffy to apply. How do you decide whether div div div
really refers to table tr td
or body ul li
? You'd have to add classes and ids then, but then you are reinventing the wheel.
Also see the recommendation of the W3C
Using the appropriate semantic elements will make sure the structure is available to the user agent. This involves explicitly indicating the role that different units have in understanding the meaning of the content. The nature of a piece of content as a paragraph, header, emphasized text, table, etc. can all be indicated in this way. In some cases, the relationships between units of content should also be indicated, such as between headings and subheadings, or amongst the cells of a table. The user agent can then make the structure perceivable to the user, for example using a different visual presentation for different types of structures or by using a different voice or pitch in an auditory presentation.
time
?