You are on page 1of 21

Hypertext Markup Language [HTML]

Learn To Create Web Page Using HTML And Introduce To Formatting And Linking Web Pages

Where Is Our Position In Internet


Internet Services
E-mail,UsenetGroup,www

http://www.google.com/

Client
Web Page

Request

Contents

Server

TCP (Transmission Control Protocol)

Web Page

Editor

Protocol HTML

IP (Internet Protocol) HTTP (Hypertext Transfer Protocol) FTP (File Transfer Protocol)

HTML

Types Web Browser


Text-only browser ( ex: Lynx) Graphical Browser (ex : Nestcape Navigator, Opera, Mozilla, Internet Explorer)

Creating HTML Document

Creating HTML Pages


An HTML Document consists :
the text to be displayed on the web page Information about formatting and structuring of the contents on the web page

HTML Syntax
<html> <Head> <Title> ..</title> </Head>
First Element

One Web Page

<Body> </Body> </html>

Second Element
Text Image Form Other Script

HEAD

BODY

Tag
Use tags to specify the format of the contents of a web page Two types of tags :
Container tag
To format blocks of text Have opening and closing tag <B>..</B>

Empty tag
To add features that are not related to formatting blocks of text Have only opening tag <BR>

Inserting Image
Graphic formats supporting by WWW
GIF JPEG BMP DIB TIFF/TIF PCX

Image tag
IMG
Used to insert the graphic in the web page

SRC
Used to specify the graphic file to be inserted in the web page

image_URL
Specifies the name of the file that contains the graphic to be inserted

Image Attribute
Image Insert To Document
Syntax <img src=Image name attribute=Value>
Attribute height width border Align ALT Value n n n Top,bottom,middle,left,right, center Default text that appear if the browser do not display the graphics

Links
Types of links
Hypertext links
Links between web pages

Section links
Links between different portions of a web page

Hypermedia links
To connect text files or multimedia files to a graphics

Hypertext Links
Anchor tag
HREF
Specify the URL of the linked document

Text
The text will displayed as a hypertext

</A>
The closing tag of anchor tag

Ex :
<A HREF=insert_graphic.htm> Clik</A> is A hypertext

Section Links
Use the Anchor tag to create section links. Specify the URL of the document tht wants to link as the section name with a preceding character # Ex
<A HREF=#C5> See Chapter 5 </A> <A Name=C5>Chapter 5</A> <P>This is Chapter 5</P>

Hypermedia links
Use combination of the anchor tag and the Image tag
HREF
To specify URL of the linked Web page or section

URL
Address of the linked web page or section

IMG SRC
To insert a graphic in a web page

Ex
<A HREF=URL> <IMG SRC=graphic filename> </A>

Formatting HTML Document

Formatting Text
Format
Bold Italic Underline Paragraph Align Line break

Tag
<B>..</B> <I>..</I> <U></U> <P>.</P> <P align=Right,Center,or Left> </P> <BR>

Horizontal line

< HR atribute=value> ..</HR>


Attribute size color width Value N red,green,blue, N

Align

Left,center,right

Heading Comment Display multiple spaces and blank lines

<H1></H1> - <H6></H6> <! this is a comment --> <PRE>.</PRE>

Formatting Image
Image map
Different from hypermedia link

Types of Image map


Server side Image map
Define a special file called map definition file with all the details of the image map

Client side image map


Include all the details of the image map in the document itself

Creating Client Side Image Map


Creating client side image map :
Dividing a graphic into different areas Linking a document to each area of the graphic

Divide a graphic into different areas using the MAP and AREA tags
<IMG SRC=.. USEMAP=#.....> <MAP NAME=..> <AREACOORDS=,,., SHAPE= HREF=Page1.HTM> </MAP>

Formatting Page
Attribute Bgcolor Background Value Red,green,blue,.. File gambar Note Background Colour Image background

Text
Link Vlink

Warna-warna
Warna Warna

Text colour
Link colour before linked Link colour after linked

Ex :
<BODY BGCOLOR=red> <BODY BACKGROUND=xxx.gif>

You might also like