...

/

Enriching Web Pages: Rendering Text

Enriching Web Pages: Rendering Text

In this lesson, we'll render text and enrich our web page.

No doubt, even in our multimedia-based web era, text is an indispensable part of web pages. As you already saw in Listing: Rendering long text, plain text without any markup is understood by the browser and rendered with replacing multiple spaces (including white space characters, such as tab) and line breaks with a single space character.

As you experienced, Exercise: Adding inline and block elements to our html used a few special markups, such as <strong> and <em>, to add special importance to their content and let the browser represent them with some kind of highlighting, such as bold and italic formatting.

HTML5 defines a number of tags that add some kind of emphasis to your text:

The <abbr> tag

  • <abbr>: Indicates an abbreviation or an acronym, like “WWW” or “SOA”. By marking up abbreviations you can give useful information to browsers, spell checkers, translation systems, and search-engine indexers.

The following examples help explain the usage of <abbr>:

The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.

The WHO was founded in 1948.

This website is all about <abbr title="HyperText Markup Language">HTML</abbr>.

This website is all about HTML.


The <b> tag

  • <b>: Renders bold text. Use <strong> instead of <b> to indicate important text.

The following examples help explain the usage of <b>:

<strong> HTML5 is so cool </strong>

HTML5 is so cool

<b> HTML5 is so cool </b>

HTML5 is so cool


The <bdo> tag

  • <bdo>: This tag is used to
...