Logo Explosvie Information for Webmasters

Some Text formatting Tags

Headings are indicated by <hn> tags example sizes are below.

<h1>Size 1</h1>

Size 1

<h4>Size 4</h4>

Size 4

<h2>Size 2</h2>

Size 2

<h5>Size 5</h5>

Size 5

<h3>Size 3</h3>

Size 3

<h6>Size 6</h6>

Size 6

Headings are emphasised (bold) and space is created both above and below.

This is a paragraph. Enclosing it in <p> and </p> causes a blank line before the paragraph. It will wrap at the right hand side of the screen exactly where will depend on the resolution of the users screen. Not much use if you want a specific presentation, like poem, but what we usually need.

To break a sentence or any other text where we want it insert <br />
this causes the text to move onto a new line. You will notice the odd format. You could use <br> this will work, but a new structure for those tags which have no end tag will soon become required. Tags which do not have an end tag will soon have to finish with a space and a slash , as above.

To keep the format of original text we use the <pre> tag it is used anywhere where we need a specific format or extra spaces which HTML generally ignores. It has been used below to format the poem (no other tags are needed).

<pre>

I halve a spelling checker
It came with my pea see
It kindly marx for my review
mis takes I kin knot sea

</pre>

Physical formatting:

The tags tell the browser exactly what to do.

This sentence is used to illusrtate the use of various text formatting tags> First up is <b>which emboldens the text</b>, next is <i> which italicises the text </i>, then there is <u> to underscore</u>, and <s> to strike through</s> . You can combine them to good effect <b><i><u>to embolden, italicise and undersore </u></i></b>. Note that you must close them in the reverse order as explained previously.

Logical Formatting:

Alternatively you could use logical formatting to leave it up to the users browser to choose how to display. <strong> generaly emboldens and <em> italicises, but the user can set up their browser to present them in whatever way they choose.

Adding a Rule to Your Page:

<hr size="7" width="50%" /> Produces a horizontal rule 7 pixels high, 50% of the screen width and centered. You can make it as long as you like by changing the precentage. I have made it unusually high to exagerate the effect.


<hr size="7" width="80%" noshade /> Produces a slightly differnet look to the rule. This is another of the odd tags which do not have an end tag, hence the unusual end.

For a summary of all the main formatting tags click here.


Previous Page   Next Page

 


UK Shopping Online


Counter