CSS: Inline spans

This entry is part 14 of 26 in the series Basic CSS

Consider the paragraph below:

<p>Ushuaia is a GREAT holiday getaway</p>

If we want to make only the word GREAT bold, we would need a container for the word.  The container that we can use is <span>.

A <span> is simply a shell into which we can place any attributes we need.

For example, to put a style on the word GREAT, we can do the following.

<!DOCTYPE html>
<head lang='en'>       
    <meta charset='UTF-8'>

<p>Ushuaia is a <span style='font-weight: bold'>GREAT</span> holiday getaway</p>


Series Navigation<< CSS: Strikethrough and underlining
CSS: Adjusting spacing between letters and words >>