C1999 Kathleen Schrock ([email protected]) 1 Basic HTML By Kathy Schrock.

37
c1999 Kathleen Schrock (k [email protected]) 1 Basic HTML By Kathy Schrock

Transcript of C1999 Kathleen Schrock ([email protected]) 1 Basic HTML By Kathy Schrock.

Page 1: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

1

Basic HTML

By Kathy Schrock

Page 2: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

2

Part 1: Basic Web Page Production

Page 3: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

3

Basic Web page creation

Basic HTML tags Heading tags Paragraph and

break tags Text alignment

Background color Text color Horizontal rules Bold and italic

Page 4: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

4

Basic HTML tags<HTML>

<HEAD>

<TITLE> </TITLE>

</HEAD>

<BODY>

</BODY>

</HTML>

Page 5: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

5

Heading tags

Used to denote main headings and subheadings; go from 1 to 6

Show relative importance of information

<H1>This is H1</H1> This is H1

<H2>This is H2</H2> This is H2

<H3>This is H3</H3> This is H3

<H4>This is H4</H4> This is H4

Page 6: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

6

Paragraph and break tags

<P></P> surround a paragraph of info Skips a line and starts a new paragraph

<BR> (single-sided tag) Starts the next word on the next line No space left between lines

Page 7: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

7

Text alignment

The default is that all text is left-aligned To align paragraphs, you can add to the

paragraph tag <P align=center> </P>

To center whole blocks of text, just use <CENTER> </CENTER>

Page 8: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

8

Background color

Attribute added to the <BODY> tag There are 16 color names you can add

(red, blue, yellow, etc.) or you have to know the hexadecimal code

Examples<BODY BGCOLOR=“red”>

<BODY BGCOLOR=“#00FFFF”>

Page 9: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

9

Changing the text color

Same codes as for background color Attribute of the body tag, too Example would lead to a light blue page

with dark purple text

<BODY BGCOLOR=“#00FFFF” TEXT=“#800000”>

Page 10: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

10

The horizontal rule

Used to separate portions of a page A one-sided tag Can include a % attribute Example

<HR>

<HR WIDTH=50%>

Page 11: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

11

Bold and italic

Used to emphasize text Two-sided tags Examples

<B>This is bold</B> This is bold

<I>This is italic</I> This is italic

Page 12: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

12

Part 2: Creating Lists

Page 13: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

13

Lists

Bulleted lists Numbered lists Definition list

Page 14: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

14

Bulleted (unordered) list

Good for drawing attention to items that are in no particular order

<UL>

<LI>Dogs * Dogs

<LI>Cats * Cats

</UL>

Page 15: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

15

Numbered (ordered) lists

Great for describing sequential tasks or step-by-step procedures

<OL>

<LI>Phase 1 1. Phase 1

<LI>Phase 2 2. Phase 2

</OL>

Page 16: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

16

Definition list

Includes a statement of the word and followed by the definition

<DL>

<DT>Cirrus Cirrus

<DD>high wispy high wispy

<DT>Nimbus Nimbus

<DD>dark dark

</DL>

Page 17: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

17

Part 3 : Links and Navigation

Page 18: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

18

Links and navigation

Relative links– Links in your own directory

Absolute links– Links located on another server

Changing link color

Page 19: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

19

Relative links

Give you the name of the file you want to access in relation to the page you are on

If index.htm and page2.htm are in the same directory, the link on the index page to page 2 would look like this

<A HREF=“page2.htm”>Go to page 2</A>

Page 20: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

20

Absolute links

Specify the entire URL to go to

<A HREF=“http://cnn.com/”>Go to CNN</A>

Page 21: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

21

Changing the link color

If you change the background color, you may need to change the link color, too

<BODY BGCOLOR=“#00FFFF” text=“#000000” link=“#FF0000” VLINK=“#000000”>

Link is the color before choosing Vlink is the color of the visited link

Page 22: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

22

Part 4: Adding Graphics

Page 23: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

23

Graphics for your page

Adding graphics to your page Aligning graphics Using graphics as links Insert a background package

Page 24: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

24

Adding graphics to your page

Two file formats– GIF for icons and line drawings– JPEG for photographs

Try to keep graphic files under 30k Example of adding an apple picture <IMG SRC=“apple.gif” alt=“apple”> The alt tag shows up in text browsers

Page 25: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

25

Aligning graphics on a page

By default, the next line of text starts after the graphic image

By using the align tag, the text can be next to the graphic

<IMG SRC=“apple.gif” alt=“apple” ALIGN=RIGHT>

Page 26: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

By using the align=right tag, you can move the picture to the right side of the text and put the text next to the picture rather than below it.

Page 27: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

27

Using graphics as links

You may use a picture as a hypertext link

<A HREF=“http://apple.com/”><IMG SRC=“apple.gif” alt=“apple”></A>

This would give you the apple picture with a blue box around it to show that it is a link; for no box, add BORDER=0

Page 28: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

28

Inserting a background picture

Background pictures should be small gifs that tile well

<BODY BACKGROUND=“background.gif” text=“#000000” link=“#FF0000” VLINK=“#000000”>

Page 29: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

29

Part 5 : Tables

Page 30: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

30

Parts of a table

<TABLE><TR>

<TD> </TD>

</TR>

<TR>

<TD> </TD>

</TR>

</TABLE>

Page 31: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

31

Adding a border

Becomes an attribute of the TABLE tag <TABLE BORDER=2> Gives your table a 2 pixel border With a border=0, you can easily create

columns that are lined up and leave as much space as you wish

Page 32: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

32

Changing the size of a table

By default, tables take up as much room as they need to hold the text

To make it a certain size, add the attribute to the TABLE tag

<TABLE height=100 width=200> You can also use these in the <TD> tag

to change the size of a particular cell

Page 33: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

33

Adding a caption

Used to tell someone what the table means

Comes after the TABLE tag <CAPTION></CAPTION> Appears at the top of the table

Page 34: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

34

Cell padding and spacing

Attributes of the TABLE tag Cell spacing adds space between the

cells without making the cells bigger Cell padding adds space around the

contents of a cell, pushing the walls of the cell outward

<TABLE cellspacing=2 cellpadding=2>

Page 35: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

35

Table Headings

Used to put column headings in the table

<TR>

<TH></TH><TH></TH>

</TR>

Page 36: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

36

Spanning across columns or cells

<TD colspan=2> would have data cover two columns

<TD rowspan=2> would have data cover two rows

Page 37: C1999 Kathleen Schrock (kschrock@capecod.net) 1 Basic HTML By Kathy Schrock.

c1999 Kathleen Schrock ([email protected])

37

The End