When writing the code that creates a webpage (authoring), content (text, images, etc.), is marked-up into elements.
Element types include: headings, tables, images and lists.
For example, to indicate that words within a sentence have particular significance, they are marked-up as an emphasis element;
<p>If you remember nothing else, remember this <em>word or phrase</em>.</p>
The above markup is displayed as:
If you remember nothing else, remember this word or phrase.
To view the code used to create this (or any other) webpage, with the webpage visible in the web browser, from the menu at the top of the screen, select
View > Source/Page Source.
Markup that, at some level, describes or affects the meaning of content is referred to as semantic markup.
In X(HTML) code, tags provide the syntax for defining (marking-up) the beginning and end of elements. How content is marked-up defines;
An emerging alternative use of the term ‘tag’ is to describe the classification of content by readers (rather than the author). For more, see metadata: Blog aggregator metadata.
99% of the time, if you use the word “tag”, you are using incorrect terminology. Tags are merely the syntax used to mark the beginning and ends of elements…consider this analogy: a parking space is usually bordered by two straight white lines. Tags are the lines. The parking space as a whole is the element.
Saying something like “I think this text should be in an em tag” is like saying “I’ll go and park in that line”. It makes no sense, does it? Saying something like “I think this text should be in em tags” is like saying “I’ll go and park in between those two lines. That makes more sense, but what you actually mean to say is “I think this text should be an em element“, which is the equivalent of “I’ll go and park in that space”.
Source: Comment 8, Alt [tags] (The Autistic Cuckoo)