Home > Articles > Web Development > HTML/CSS

  • Print
  • + Share This
This chapter is from the book

Text Emphasis

So far you've learned how to add text, but here you will learn how to format it. You will occasionally want to add emphasis to your text to make it stand out. HTML enables you to quickly apply some standard formats, such as boldface and italic, using a predefined set of tags. All these tags occur in pairs (corresponding opening and closing tags) and must surround the text that they are emphasizing. Use the code that follows in your own Web page to see how each of these tags appears in the browser.

<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml"
       xml:lang="en" lang="en">
<title>Emphasizing Text</title>
<p>Make your text one size larger with the
   <big>big tag.</big></p>
<p>Try the <b>bold tag</b> or the <strong>strong tag</strong>
   to make an impact.</p>
<p>The <i>italics tag</i> and the <em>emphasis tag</em>
 create a different impact.</p>
<p>Use the <tt>teletype tag</tt> to imitate a typewriter.</p>
<p>Make your text one size smaller with the
   <small>small tag.</small></p>

You'll learn how to create style sheets in Lesson 5, "Adding Your Own Style." Throughout the book, however, you'll see how styles can enhance your Web pages.

  • + Share This
  • 🔖 Save To Your Account