HTML Guide & Example

HTML Guide & Example

Basic HTML
Heading Level
Font Size
Font Color
Font Style
Horizontal Rule
Table
Graphics Image
Form

Basic HTML


<HTML>

<TITLE>HTML Guide & Example - This title will appear on the title bar (at the top of the window)</TITLE>

<!-- This is a comment tag -->

</HTML>

<BODY BGCOLOR=WHITE>
<BODY BACKGROUND=sample.gif>
<BGSOUND SRC=music.mid loop=infinite autostart=true> * Microsoft Internet Explorer only *
<EMBED SRC=music.mid width=50 height=15 controls=smallconsole autostart=true loop=true>

<A HREF="http://sunflower.singnet,com.sg/~klien">This is a Link to My HomePage</A>
This is a Link to My HomePage

<A NAME=TOP>
<A HREF=#TOP>Back to Top</A>
Back to Top

<A HREF=xxx NAME=xxx TARGET=xxx >Anchor</A>

<META HTTP-EQUIV="REFRESH" CONTENT="10; URL=links.htm"> * Meta Tag must be placed at the beginning *

<CENTER>This tag will center the text</CENTER>

This tag will center the text

<BR> - Line Break

& amp; = &
&lt; = <
&gt; = >

Blank & nbsp; & nbsp; & nbsp; Space
Blank     Space * & nbsp; will insert a blank space *

<PRE> This is preformatted text </PRE>

This is preformatted text

Heading Level


<H1>Heading Level 1</H1>

Heading Level 1

Heading Level 2

Heading Level 3

Heading Level 4

Heading Level 5
Heading Level 6 (Max)

Font Size


<FONT SIZE=1>Font Size=1 (Smallest)</FONT>
Font Size=1 (Smallest)

Font Size=2
Font Size=3
Font Size=4
Font Size=5
Font Size=6
Font Size=7 (Largest)

Font Color


<FONT COLOR=RED>COLOR=RED</FONT>
COLOR=RED
COLOR=ORANGE
COLOR=YELLOW
COLOR=GREEN
COLOR=LIGHTGREEN
COLOR=BLUE
COLOR=LIGHTBLUE
COLOR=CYAN
COLOR=LIGHTCYAN
COLOR=MAGENTA
COLOR=BLACK
COLOR=GRAY

Font Style


<B>BOLD</B>
BOLD

<I>ITALIC</I>
ITALIC

<BLINK>BLINK</BLINK>
BLINK

Horizontal Rule


<HR>

<HR SIZE=1>

<HR SIZE=2>

<HR SIZE=3>

<HR SIZE=4>

<HR SIZE=5>

<HR SIZE=10>

<HR WIDTH=50%>

<HR WIDTH=50% ALIGN=LEFT>

<HR WIDTH=50% ALIGN=RIGHTT>

<HR WIDTH=400>

<HR NOSHADE>

Table


<TABLE BORDER>
<TR>
<TD>This is Column 1</TD>
<TD>Column 2</TD>
</TABLE>
This is Column 1 Column 2

<TABLE BORDER>
<TR ALIGN=CENTER>
<TD>A</TD>
<TD>B</TD>
<TD>C</TD>
<TR>
<TD>This is Column 1</TD>
<TD>Column 2</TD>
<TD>Col 3</TD>
</TABLE>
A B C
This is Column 1 Column 2 Col 3

<TABLE BORDER=3 WIDTH=300 HEIGHT=100>
<TR ALIGN=CENTER>
<TD>A</TD>
<TD>B</TD>
<TD>C</TD>
<TR>
<TD>This is Column 1</TD>
<TD>Column 2</TD>
<TD>Col 3</TD>
<TR>
<TD>abc</TD>
<TD>defgh</TD>
<TD>ijklmnop</TD>
</TABLE>
A B C
This is Column 1 Column 2 Col 3
abc defgh ijklmnop

Graphics Image


<IMG SRC=sample.gif>

<IMG BORDER=1 SRC=sample.gif>

<IMG BORDER=2 SRC=sample.gif>

<IMG BORDER=3 SRC=sample.gif>

<IMG WIDTH=50 SRC=sample.gif>

<IMG WIDTH=200 SRC=sample.gif>

<A HREF="http://sunflower.singnet.com.sg/~klien"><IMG SRC=sample.gif BORDER=0></A>


Form


<FORM>
</FORM>

<FORM METHOD="POST" ACTION="/cgi-bin/xxx.cgi">
<FORM METHOD="GET" ACTION="/cgi-bin/xxx.cgi">

<INPUT TYPE=TEXT>


<INPUT TYPE=PASSWORD>


<INPUT TYPE=RADIO>


<INPUT TYPE=CHECKBOX>


<INPUT TYPE=SUBMIT>


<INPUT TYPE=RESET>




Last update : 28/4/97