ptg16476052
130 LESSON 7: Formatting Text with HTML and CSS
hearing, but with some work you could actually get your phone
turned off.
</pre>
One creative use of the <pre> tag is to create ASCII art for your web pages. The follow-
ing HTML input and output example shows a simple ASCII-art cow:
Input ▼
<pre>
( )
Moo (oo)
\/------\
|| | \
||---W|| *
|| ||
</pre>
Figure 7.4 displays the result.
Output ▼
Horizontal Rules (or Thematic Breaks)
The <hr> tag, which has no closing tag in HTML and no text associated with it, creates
a horizontal line on the page. As of HTML5, the tag has also been given a semantic
meaning—thematic break. It’s represented by a horizontal line as it always has been,
but it has now been ascribed a semantic meaning as well. It represents a change of topic
within a section or, for example, a change in scene in a story.
FIGURE 7.4
A bit of ASCII art
that illustrates how
preformatted text
works.