Quick HTML




Formatting the text

Now we'll see the basic rules of text formatting.

Force a line break (carriage return)

Put the <BR> tag in the desired point.
Who's that girl?<BR>She's so pretty...
Who's that girl?
She's so pretty...

Put a single empty line

Place two <BR> tags.
I've lost my glasses.<BR><BR>Help!
I've lost my glasses.

Help!

To have n empty lines, insert (n+1) <BR> tags.

Write bold text

The bold text has a thicker font.
Type the text between the <B> tag and the </B> tag.
Mike has a <B>big</B> house.
Mike has a big house.

Write italic text

The italic text has a sloping font.
Type the text between the <I> tag and the </I> tag.
Peter has a <I>Stratocaster</I> guitar!
Peter has a Stratocaster guitar!

Quote some text

If you need to quote (cite) a portion of text,
put it between the tags <BLOCKQUOTE> and </BLOCKQUOTE>.

It will appear lightly shifted to the right (indented).
She told me:<BLOCKQUOTE>It was a dark and stormy night...</BLOCKQUOTE>
She told me:
It was a dark and stormy night...

Draw an horizontal line

Put the <HR> tag.
This is a line (Horizontal Rule). It is a content separator.<HR>
This is a line (Horizontal Rule). It is a content separator.

Preformatted text

The other way to display a text with spaces, indentation, and blank lines, is to use the preformatted text.
The preformatted text uses a monospace font ( a fixed-width font, as Courier ).

Type the whole text between the <PRE> tag and the </PRE> tag.
What you type is what you get.

Tip : short text lines looks better.


<PRE>
There was
	a little sun
	in the midnight

There was
	a little moon
	in the morning
</PRE>
There was
	a little sun
	in the midnight

There was
	a little moon
	in the morning

Style combinations

The formatting styles (bold, italic, blockquote, preformatted) can be combined together.
To make a combination, write one tag block inside the other.
This <I><B>cell phone</B></I> costs <B>$ 199</B>.
This cell phone costs $ 199.

Special characters

Some special characters, as & , © , € and so on, have an equivalent representation (reference):

This table shows the most used and the equivalents:

 
Name Character Equivalent
Space   &nbsp;
Dash &mdash;
Less than < &lt;
More than > &gt;
Ampersand & &amp;
Quotation mark " &quot;
Degree sign ° &deg;
Copyright © &copy;
Registered Brand ® &reg;
Trademark &trade;
Euro &euro;
Pound £ &pound;
Yen ¥ &yen;
 


To write a special character, use the equivalent entity:
This is the "ampersand" character: &amp;
This is the "ampersand" character: &


Sometimes you need to insert a fixed length space.
You can display a space of n characters writing n times &nbsp;
| Spring Summer Autumn |<BR><BR>
| Spring&nbsp;&nbsp;&nbsp;&nbsp;Summer&nbsp;&nbsp;&nbsp;&nbsp;Autumn |
| Spring Summer Autumn |

| Spring    Summer    Autumn |

Comment the code

We can add a comment into the code, writing it between   <!––   and   ––>

Note:
  • remember to leave a space after   <!––   and before  ––>
  • comments are hidden from normal view.
<P> This is the first chapter:... </P>

<!-- First chapter ends here -->


<!-- Second chapter begins here -->

<P> This is the second chapter:... </P>

This is the first chapther:...

This is the second chapther:...



Next page :

how to write lists.



|   Back   |   Index   |   Next   |