Supported by :   My Law Forms Ltd. - Deed polls and Tenancy Agreements

XHTML help: basics – essential tags (p em strong)

There’s pretty much one element you absolutely can’t live without when marking up your pages. It’s the paragraph element. You’ll use this tag to mark, you guessed it, paragraphs. Here’s how:

<p>This is my paragraph that isn’t much of a paragraph. Aren’t paragraphs 3-4 sentences long?</p>

Of course you’ll typically want to express yourself a little more when writing a paragraph by emphasizing text or by making it strong. The tags you use here are equally obvious, that’s right the em and strong tags.

To add emphasis to your words wrap them up in an em tag like this:

<p>This is my paragraph that <em>isn’t much of a paragraph</em>. Aren’t paragraphs 3-4 sentences long?</p>

And to add a little power to a word give it a strong tag:

<p>This is <strong>my</strong> paragraph that isn’t much of a paragraph. Aren’t paragraphs 3-4 sentences long?</p>

I’m sure you’ve heard of the bold and italic equivalents of these elements, b and i. These tags are valid but you shouldn’t use them because they express how something should be presented. It’s best to just use XHTML for structural purposes and let CSS decide what to make bold and italic.

This entry was posted on Monday, April 2nd, 2007 at 1:41 pm and is filed under HTML help, XHTML tips. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.