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>
<html>
<head lang='en'>       
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Span</title>
</head>
<body>

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

</body>
</html>

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