Simple font tags

See more about:

Where are we?

You know how to create a Web page with headings, paragraphs, line breaks, and other things. Let’s have a look at some simple tags for font rendering.

Note that most font work is done in CSS. We’ll look at that in the next lesson. The tags here only give you limited control.

Strong

The <strong> tag makes text grab the reader’s attention. <strong> usually makes text bold. I say “usually,” because a Weber can change this (though few do).

Here’s an example:

<p>"Sir, I am a <strong>dog</strong>, not a cat!" said the Scottie.</p>

“Sir, I am a dog, not a cat!” said the Scottie.

Sometimes I use <strong> when introducing a new term, like cascading style sheets.

Emphasized

The <em> tag usually makes text italic. I use <em> when something is important, or to add stress to mimic speech.

An example:

<p>"But are you <em>happy</em>?" asked the cow.</p>
<p>"Yes," replied the dog. "<em>Very</em> happy."</p>

“But are you happy?” asked the cow.

“Yes,” replied the dog. “Very happy.”

You can imagine a cow and a dog talking, with stresses on the italicized words.

Exercise: How many dogs does it take ...

Create a page that looks something like this when rendered.

Result

When you have finished, compare the HTML source code of my solution with yours. Look at the way my HTML is laid out, especially the indenting.

Upload your solution to your server, and enter the URL below.

[solution]You can try my solution

(Log in to enter your solution to this exercise.)

Summary

In this lesson, we talked about basic font manipulation with <strong> and <em>.

What now?

These tags let you do a little basic font work. Let’s see how you can take it further, and change typefaces, colors, and other stuff.


How to...

Lessons

User login

Log in problems? Try here


Dogs