Learn in the textbookData Description Languages (Markup Languages and Structured Data Formats)
DefinitionA tag (タグ) is a marker that encloses a name in "<" and ">" and shows which stretch of a document or data represents what.
ExplanationContent is usually enclosed between a start tag such as <p> and an end tag with a slash added, such as </p>, forming one element. Placing elements inside other elements, called nesting, expresses a hierarchy like sections within a chapter. When a browser displays the page, the tags themselves do not appear on screen; they give a role to the content they enclose.
AnalogyIt is like putting two bookmarks in a book to show "Chapter 2 starts here" and "Chapter 2 ends here". The text does not change, but you can see which stretch is what.
Memory hookIn everyday English, a tag is a name label tied to luggage. Its job of naming what is inside carries straight over to the term.