Free HTML Course: Week 2 - Paragraphs, Headings, and Emphasis

| Saturday
If you can't see this email, click here

About.com


Week 2 - Paragraphs, Headings, and Emphasis
Jennifer Kyrnin
From Jennifer Kyrnin, your Guide to Web Design / HTML

In this lesson, we will learn how to modify the text of the page we wrote in lesson 1. If you created a page using just the basic XHTML tags, the paragraphs you wrote all blurred together into one long line. This is because XHTML requires tags to define where the paragraphs begin and end.

Note: if you didn't receive Week 1 you can always pick up missed lessons online at: http://webdesign.about.com/c/ec/9lost.htm You can also get the lessons more quickly if you'd like.

Syllabus
Week 2
  • Creating paragraphs - making your text readable
  • Line breaks - move the text down one line rather than a whole paragraph
  • Adding headings - organizing your content
  • Strong and Emphasis - changing the look of text
  • Homework


Paragraphs and Spacing
Using P and BR Tags

The P and BR tags are the most basic text tags available in XHTML. The P tag puts your text in a paragraph, and the BR tag adds line breaks.


Paragraphs

Most tags in XHTML are called paired tags, this means that they have a start tag and an end tag that surrounds the text that is to be affected. In lesson 1 you learned about the four basic paired tags: <html></html>, <head></head>, <title></title>, and <body></body>.

The next tag we'll learn about is the paragraph tag:
<p></p>

Like the basic tags, it is a paired tag. You should surround all text you want in paragraphs with this tag. For example, to write the above paragraph in XHTML, you would write:

<p> The next tag we'll learn about is the paragraph tag. </p>


Line Breaks

The <p></p> tag doesn't always do exactly what you want. It adds additional space after the paragraph in question, and sometimes you just want to drop down one line of text, such as in a street address.

For this you would use the non-paired line-break tag:
<br />

Notice that because this is a non-paired tag, it includes the closing slash (/) at the end of the tag itself. This is valid XHTML.


Headings and Emphasis
What is an HTML Heading?

There is more to XHTML than just paragraphs and line breaks. You can organize your Web pages in specific ways to make them easier to read and understand. There are six headings in XHTML <h1></h1> through <h6></h6>

Read more about HTML heading tags: http://webdesign.about.com/od/htmltags/p/bltags_headings.htm


What is an Emphasis Tag?

Another way to modify your text is to use strong <strong></strong> and emphasis <em></em> tags to change the way words and phrases look.

These tags are easy to use and make your text easier to read as you highlight specific elements.

Read more about the strong and emphasis tags: http://webdesign.about.com/od/htmltags/p/bltags_strong.htm
http://webdesign.about.com/od/htmltags/p/bltags_em.htm


Homework
Practice What You've Learned

Edit the first page you created last week and add paragraphs, headings and strong or emphasis text where appropriate. Be sure to preview your page in a Web browser before you upload it.

If you have any questions about lesson 2, post them to the HTML forum to get help from other classmates and people who use the forum regularly.

Here is a sample of how I handled the homework. Notice that last week it was all one long paragraph, and this week it's got more to it. http://webdesign.about.com/od/html101classes/l/zhtmlclass2.htm



This email is written by:
Jennifer Kyrnin
Web Design / HTML Guide
Email Me | My Blog | My Forum
 
Missing a lesson? Click here.

About U. is our collection of free online courses designed to help you learn a new skill, solve a problem, get something done, or just learn more about your world. Sign up now, and we will email you lessons on a daily or weekly basis.
You are receiving this email because you subscribed to the About.com 'Free HTML Course' email. If you wish to unsubscribe, please click here.

About respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2010 About.com
 

Advertisement

0 comments:

Post a Comment