html 101

Working With Text

You insert normal text by using the paragraph tag: . Because it's a block-level element, the paragraph tag automatically creates an empty line above and below itself. Let's create a new paragraph in the section, under the heading:

Paragraph textNotice that the text aligns to the left, because it is not contained in the div tag that aligns center.

Emphasizing text

We can emphasize text by using the <strong> and <em> tags. <strong> makes text stand out as bold by default, and <em> emphasizes (italicizes) text.

Let's use these two tags – strong and em – in our sentence:

Emphasis text
Now let's write a new sentence inside the same paragraph, while putting some space in between the lines by using the break tag: which is the equivalent of holding down Shift while you hit Enter/Return in a word processor – you get a line break, but not a new paragraph.

Line break
Notice that your second sentence is on a new line, but still contained within the same paragraph.

Comments

1) Charles Blubaugh, April 5, 2012 at 4:23 a.m. [Link]

I am using Firefox 11 and Vista.

In line 10 of the example, explaining the <br />, the text is cut off after "<strong>Graduate

The next line is </p>

Great tutorial

You must be logged in to post comments.