Published: 23rd April 2016.
Updated: 26th May 2016.
WYSIWYM, WYSIWYG, semantic, HTML.
Web pages are electronic documents containing nothing but plain text, and it written in a computer language called HTML. This language puts structure on the web page by marking-up its content with various tags that have semantic meaning.
Like the bailiffs, these tags generally come in pairs; marking the start and end of content elements:
<h1>this is a main heading
<p>this is a paragraph
<q>this is a quotation
<em>this is emphasised
</em> (as in spoken emphasis —
</em> eat that dog food!),
<strong>this is of strong importance
</strong> (drinking Domestos
<strong>will kill you
</strong>) and so on…
The visual presentation of the content on screen is managed (styled) by a different Web technology called CSS, which bases its styling on the HTML tags. Headings are rendered in larger text than paragraphs and are emboldened. Paragraphs are rendered in simple body text. Quotes are put under inverted commas, emphasis is italicised and strong importance is emboldened.
HTML also has ways to store background information about the content 'under the bonnet'. For instance,
<p lang="en">this paragraph is in English
<p lang="ga">is i nGaelainn athá an ceann so
</p>. This information can be used to apply different styling to different classes of content, to make them stand out from each other. It can also be used to improve search results.
So that's the right way to do it. It gives the Web page and its content a defined structure that makes it meaningful to everyone, from human beings with the use of their eyes to human beings that don't have that luxury to all kinds of electronic readers (including those used by the blind) and automated data mining programmes.
Sadly, there's also plenty of wrong ways to do it and, sadly, there's a lot of it about. For example, since
</em> a piece of text has the effect of italicising it on screen, some web authors and web authoring software developers think it is fine to use it to provide one-size-fits-all italics: he reads
<em>The Daily Rag
</em> is man's best friend, she forgot her
</em>, hush now and go to sleep,
<em>a stóirín mo chroí
</em>… You get the idea. Not a problem if you're a person; who reads text by looking at it; but for everyone — and everything — else, it all comes across a bit like Brian Blessed in The Black Adder.