Semantic versus cosmetic tags
Some HTML tags describe how a piece of content should appear. We call these cosmetic tags. For example, the <i> tag indicates that text should be printed in an italic font. Consider, though, that italics are used in modern printing for many reasons—to emphasize a word, to indicate a title of a published work, or to indicate that a phrase is from a foreign language. To differentiate between these uses, HTML also has semantic tags. For example, <em> means emphasis, and will result in italic text in most situations. But unlike the <i> tag, it also indicates why the text should be italic. Older versions of HTML generally focused on cosmetic tags, whereas newer versions focus increasingly on semantic tags.
Qt's rich-text ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access