Basic HTML Part 1: Basic Web Page Production
Basic HTML Part 1: Basic Web Page Production
</BODY>
</HTML>
c1999 Kathleen Schrock 3 c1999 Kathleen Schrock 4
([email protected]) ([email protected])
1
Text alignment Background color
n The default is that all text is left-aligned n Attribute added to the <BODY> tag
n To align paragraphs, you can add to the n There are 16 color names you can add
paragraph tag <P align=center> </P> (red, blue, yellow, etc.) or you have to
know the hexadecimal code
n To center whole blocks of text, just use n Examples
<CENTER> </CENTER> <BODY BGCOLOR=“red”>
<BODY BGCOLOR=“#00FFFF”>
2
Lists Bulleted (unordered) list
n Relative links
Part 3 : Links and Navigation – Links in your own directory
n Absolute links
– Links located on another server
n Changing link color
3
Relative links Absolute links
n Give you the name of the file you want n Specify the entire URL to go to
to access in relation to the page you are
on n <A HREF=“http://cnn.com/”>Go to CNN</A>
n If index.htm and page2.htm are in the
same directory, the link on the index
page to page 2 would look like this
n <A HREF=“page2.htm”>Go to page 2</A>
4
Aligning graphics on a page
By using the
align=right tag, you
n By default, the next line of text starts can move the
after the graphic image picture to the right
side of the text and
n By using the align tag, the text can be
put the text next to
next to the graphic the picture rather
n <IMG SRC=“apple.gif” alt=“apple” than below it.
ALIGN=RIGHT>
Parts of a table
<TABLE>
<TR>
Part 5 : Tables <TD> </TD>
</TR>
<TR>
<TD> </TD>
</TR>
</TABLE>
c1999 Kathleen Schrock 29 c1999 Kathleen Schrock 30
([email protected]) ([email protected])
5
Adding a border Changing the size of a table
n Becomes an attribute of the TABLE tag n By default, tables take up as much room
n <TABLE BORDER=2> as they need to hold the text
n Gives your table a 2 pixel border n To make it a certain size, add the
n With a border=0, you can easily create attribute to the TABLE tag
columns that are lined up and leave as n <TABLE height=100 width=200>
much space as you wish n You can also use these in the <TD> tag
to change the size of a particular cell
n Used to tell someone what the table n Attributes of the TABLE tag
means n Cell spacing adds space between the
n Comes after the TABLE tag cells without making the cells bigger
n <CAPTION></CAPTION> n Cell padding adds space around the
n Appears at the top of the table contents of a cell, pushing the walls of
the cell outward
n <TABLE cellspacing=2 cellpadding=2>
n Used to put column headings in the n <TD colspan=2> would have data cover
table two columns
<TR>
<TH></TH><TH></TH>
</TR> n <TD rowspan=2> would have data
cover two rows
6
The End