As discussed earlier, semantic markup changes the meaning and emphasis of written text. Just as with the structural markup elements just presented, semantic elements are included directly in the text document and are signified by tags that surround the text they apply to.
One of the most common types of semantic markup is to “bold” some text. The element used for identifying bold text is <b>...</b>
.
However, it is important to recognize that the use of bold text does not imply any extra meaning. For this reason, you are encouraged to use the strong element.
The use of a strong ( <strong>...</strong>
) element indicates that its content has strong importance. By default, browsers will show the contents of strong elements in bold.
Just like bold, another very common semantic alteration is the use of italicized text. Text can be marked up as italicized with the use of <i>...</i>
.
As with bold/strong, italicized text does not necessarily imply semantically different meaning. Instead, you are encouraged to use the ”emphasis” element instead ( <em>...</em>
). The emphasis element indicates subtle changes in the meaning of a sentence. By default the browser will show these elements in italic.
The superscript ( <sup>...</sup>
) & subscript ( <sub>...</sub>
) elements are used to raise or lower text relative to normal text.
The superscript element is used to denote characters that should appear as ‘superscript’; such as date suffixes or mathematical powers.
The subscript element is commonly used with footnotes or in mathematical and chemical formulas.
Read the rest of Chapter 02 as asked in the { TODO: } below. Please pay particular attention to the remaining semantic markup elements presented there that we are not discussing here. These include:
Block Quotes & Quotations(
<blockquote cite="">...</blockquote>
, <q>...</q>
)<abbr title="">...</abbr>
)<cite>...</cite>
)<dfn>...</dfn>
)<address>... </address>
)<del>...</del> <ins>...</ins>
)( <s>...</s>
)
You are responsible for all of these in Project 2.
Read pages 45-61 of Chapter 02 in Duckett.