HTML Basic Text Tags

We use HTML tags for semantics, which means that they will sort of tell you the type of content that they have inside of them. This is important to remember with these text tags. Use the most accurate tags around the text you are marking up.

  • <p></p>paragraphs (basic tags for text, usually that is more than one line long and doesn’t have any more specific description, like list or address)
  • <br>line break (a void tag, these are used for styling, so it is generally not necessary or correct to use them outside of an address tag or a poem that needs special formatting that can’t be done with CSS)
  • <em></em>emphasis (displays in italics, these tags are for text that needs to be emphasized)
  • <strong></strong> – strong importance (displays in bold, this is for text that is important on the page that is not a heading and needs to stand out to the user)
  • <cite></cite> – citation (displays in italic, these tags are for the titles of things like books or songs)
  • <mark></mark> – highlight (displays as highlighted text, for text that is important and needs to be highlighted semantically)
  • <b></b> – attention, not important (used for text that needs attention, like key words)
  • <i></i> – alternative voice (text that would be read in an alternative voice, like that in another language than the page)
  • <u></u> – underline (this is for text that needs to be underlined, like misspelled words)

Basic Text Tags Examples

View examples showing the code above in the pen below. You should be able to view the embedded pen here, but you can also click this link to view it on CodePen.