week 1 8/10/2015istts, 2008. agenda introduction to html creating and publishing a web page...

28
Week 1 06/23/22 iSTTS, 2008

Upload: tyler-payne

Post on 23-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Week 1

04/19/23 iSTTS, 2008

Page 2: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

AgendaIntroduction to HTMLCreating and publishing a Web pageValidating a documentMain HTML elementsBlock-level HTML elementsText-Level HTML elementsCreating Hypertext linksAdding images to documentsTableFrames

04/19/23 iSTTS, 2008

Page 3: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

The World Wide WebDefinitions

The World Wide Web The set of computers on the Internet that support

HTTPNot a separate network

HTTPThe HyperText Transfer ProtocolThe protocol used by a WWW client (e.g. Netscape

Internet Explorer) to request documents from a WWW server (i.e. the program running at Web sites like amazon.com or yahoo.com)

HTML

04/19/23 iSTTS, 2008

Page 4: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML FileHTML stands for Hyper Text Markup Language An HTML file is a text file containing small

markup tags The markup tags tell the Web browser how to

display the page An HTML file must have an htm or html file

extension

04/19/23 iSTTS, 2008

Page 5: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Document Template<HTML><HEAD>

<TITLE> My First Page </TITLE></HEAD><BODY>

<H1> My First Heading </H1><b> Welcome to My Page </b><!-- Rest of the page goes here -->

</BODY></HTML>

04/19/23 iSTTS, 2008

Goes on browser’stitle bar

Main heading. Often used as title.

HTML CommentReplace with body of WWW page

Page 6: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML ElementsHTML documents are text files made up of

HTML elements.HTML elements are defined using HTML

tags.

04/19/23 iSTTS, 2008

Page 7: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Elements ( cont’d)HTML Element

<b>This text is bold</b> The HTML element starts with a start tag:

<b> The HTML element ends with an end tag:

</b>

04/19/23 iSTTS, 2008

Page 8: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Tag AttributesTags can have attributes. Attributes provide additional information to

an HTML element.

04/19/23 iSTTS, 2008

Page 9: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Basic HTML TagsThe most important tags in HTML are tags

that define headings, paragraphs and line breaks.

04/19/23 iSTTS, 2008

Page 10: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Basic HTML TagsTag Description

<html> Defines an HTML document

<body> Defines the document's body

<h1> to <h6> Defines header 1 to header 6

<p> Defines a paragraph

<br> Inserts a single line break

<hr> Defines a horizontal rule

<!--> Defines a comment04/19/23 iSTTS, 2008

Page 11: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Text FormattingTag Description

<b> Defines bold text

<big> Defines big text

<em> Defines emphasized text 

<i> Defines italic text

<small> Defines small text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text04/19/23 iSTTS, 2008

Page 12: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Character EntitiesSome characters like the < character,

have a special meaning in HTML, and therefore cannot be used in the text.

To display a less than sign (<) in HTML, we have to use a character entity.

04/19/23 iSTTS, 2008

Page 13: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Character EntitiesResult Description

Entity Name

Entity Number

 non-breaking

space&nbsp; &#160;

< less than &lt; &#60;

> greater than &gt; &#62;

& ampersand &amp; &#38;

" quotation mark &quot; &#34;

04/19/23 iSTTS, 2008

Page 14: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML ListsUnordered Lists

<ul> <li>Coffee</li> <li>Milk</li> </ul>

Ordered Lists<ol> <li>Coffee</li> <li>Milk</li> </ol>

04/19/23 iSTTS, 2008

Page 15: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Links<a href="lastpage.htm">

This text</a> is a link to a page on

this Web site.

04/19/23 iSTTS, 2008

Page 16: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

HTML Image<p>

An image from another folder:

<img src="/images/netscape.gif"

width="33" height="32">

</p>

04/19/23 iSTTS, 2008

Page 17: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Tips for writing tagsUse lowercase tags and attributes

World Wide Web Consortium (W3C) recommends lowercase tags

Always quote attribute values

04/19/23 iSTTS, 2008

Page 18: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Simple Table (1 row and 1 column)

<TABLE border=1 align=center width=50% height=100>

<TR>

<TD>Table 1 </TD>

</TR>

</TABLE>

Table 1

Page 19: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Simple table 2 (2 row and 3 column)

<TABLE border=1 align=center width=50% height=100><TR> <TD>11</TD> <TD>12</TD> <TD>13</TD></TR><TR> <TD>21</TD> <TD>22</TD> <TD>23</TD></TR></TABLE>

11 12 13

21 22 23

Page 20: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

CellPadding and CellSpacing

<TABLE border=1 height=100 cellpadding=15 cellspacing=5>

<TR> <TD >1 1</TD> <TD>1 2</TD> <TD>1 3</TD></TR><TR> <TD >2 1</TD> <TD>2 2</TD> <TD>2 3</TD></TR></TABLE>

cellpadding

cellspacing

Page 21: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Cell Alignment<TABLE border=1 align=center width=50%

height=100><TR> <TD align=center>21</TD><TD valign=middle>22</TD><TD valign=bottom>23</TD></TR></TABLE>

Page 22: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Colspan and Rowspan

1 2 3 4

5 6 7 8

Page 23: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Colspan

12 3 4

5 6 7 8Colspan = 2

Page 24: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Rowspan

15

2 3 4

6 7 8Rowspan = 2

Page 25: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Complex Table

use nested table

?

Page 26: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

FrameXanth Series

by Piers Anthony

A Spell for Chameleon

Source of Magic

Castle Roogna

Centaur Aisle

Ogre! Ogre!

Source=atas.html

Name=topFrame

Source=kiri.html

Name=leftFrame

Source=01.html

Name=mainFrame

Page 27: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Tag HTML Frame

<frameset rows=25%,* cols=* >

<frame src="atas.htm" name="topFrame">

<frameset rows="*" cols="100,*" > <frame src="kiri.htm" name="leftFrame"> <frame src="01.htm" name="mainFrame"> </frameset>

</frameset>

Page 28: Week 1 8/10/2015iSTTS, 2008. Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML

Tag HTML Kiri.htmlA Spell for ChameleonSource of MagicCastle RoognaCentaur AisleOgre! Ogre!

<a href="01.htm" target="mainFrame">A Spell for Chameleon</a>