Thursday, June 01, 2006

Some useful HTML tags

These are some useful, simple, HTML tags, collected in one handy place for me to refer to.

Note to self: be careful when editing this page, as Blogger's Compose editor and Preview tend to screw up the gt and lt signs.

Changing Blogger's default unordered list style:
Add style="list-style-type:disc;" to the standard ul tag.

Text in reverse video, like this:
<span style="color:white; background-color:black; font-weight:bold;">text goes here</span>

HTML comment: <!-- this is a comment -->

Standard Blogger sizing (found in Compose menu):
Huge <span style="font-size:180%;">Huge</span>
Large <span style="font-size:130%;">Large</span>
Normal
Small <span style="font-size:85%;">Small</span>
Tiny <span style="font-size:78%;">Tiny</span>



Footnotes:
<a name="top"></a>Main text.
<a href="#footnote">[1]</a>
<span style="font-size:85%;"><a name="footnote"></a>
[1] text<a href="#top">Back</a></span>

Forcing a space: &nbsp;

Bullets and dots:
&middot; · middle dot or interpunct
&sdot; ⋅ dot operator from mathematics
&bull; • bullet

Horizontal line: <hr>

Use the PRE tag for pre-formatted text.

To force a link to open in a new window, use this:
<a href="http://www.google.com" target="_blank"> Some Text! </a>



A useful list of HTML codes is here.


More to be added as I need them.

2 comments:

Chip said...

Thanks for posting these tips. It's a lot easier to read what your tips than try to navigate official help documentation!

The Best of YouTube said...

wow...
this will be really useful.
thanks a lot!!!!!!!!!!
i will add some of this code on my site and see if it works..