HTML: Styling Text (em tag and strong tag)
INTRODUCTION TO HTML
You can also style text using HTML tags. The <em> tag emphasizes text, while the <strong> tag highlights important text.
Later, when you begin to style websites, you will decide how you want browsers to display content within <em> and <strong> tags. Browsers, however, have built-in style sheets that will generally style these tags in the following ways:
- The
<em>tag will generally render as italic emphasis. - The
<strong>will generally render as bold emphasis.
Take a look at each style in action:
<p><strong>The Nile River</strong> is the <em>longest</em> river in the world, measuring over 6,850 kilometers long (approximately 4,260 miles).</p>
In this example, the <strong> and <em> tags are used to emphasize the text to produce the following:
The Nile River is the longest river in the world, measuring over 6,850 kilometers long (approximately 4,260 miles).
As we can see, “The Nile River” is bolded and “longest” is in italics.
Comments
Post a Comment