Skip to content

Courses / HTML5 Mastery: Complete Beginner to Advanced Course / HTML Text Basics

639 people viewed this

HTML Text Basics

Blockquote vs Q

  • <blockquote> — an extended quotation presented as a separate block.
  • <q> — a short inline quotation.

For a visible source, you can add a citation outside the quotation:

<blockquote cite="https://example.com/article">
  <p>Example quotation from the article.</p>
</blockquote>

<p>Source:
  <a href="https://example.com/article">Read the original article</a>
</p>

Only present text as a quotation when you have a legitimate source and permission or another valid basis to use it. Attribute quotations accurately.


10. Abbreviations, Definitions and Citations

The Abbr Element

Use <abbr> to identify an abbreviation or acronym. The optional title attribute can provide its expanded form.

<p>
  <abbr title="HyperText Markup Language">HTML</abbr>
  structures web content.
</p>

Some browsers may show the title as a tooltip. Do not rely on a tooltip as the only way to provide essential information, particularly for touch and keyboard users.

The Dfn Element

Use <dfn> to mark the defining instance of a term in a definition.

<p>
  <dfn>HTML</dfn> is the standard markup language
  used to structure content on the web.
</p>

The surrounding text provides the definition. The dfn element identifies the term being defined; it does not automatically create a dictionary entry.

The Cite Element

Use <cite> for the title of a creative work, such as a book, film, song, or research paper.

<p>I am reading <cite>The Pragmatic Programmer</cite>.</p>

Do not use <cite> simply to identify a person's name as the author of a quotation. It is intended for the title of a work.

Combining These Elements

<p>
  <abbr title="HyperText Markup Language">HTML</abbr>
  is discussed in the book
  <cite>HTML and CSS: Design and Build Websites</cite>.
</p>

The example identifies the abbreviation and the title of a book. Always ensure the content and attribution accurately reflect the real source.


11. Code, Keyboard Input and Sample Output

Rate this course

5.0 · 1 rating

Stars show on this course. Your written note stays private.

Your stars