HTML Revisited
Learning Goals for Today 1.To develop your personal Web page 2.To upload your Web page to UMT’s Web server so that it becomes visible on the Internet as where xxxxxxxxx is your user ID
But first … How to develop personal Web page and make it available over the Internet through the URL
Requirements Text Editor Browser Server
link URL page title
HTML Hyper Text Markup Language
Tags HTML consists of sets of commands called Tags Tags tell browser how to display information. Tags come in pairs Tags are not case sensitive Document Tags Text Structure Tags
Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course. HTML Code
Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course. HTML Code The ones in yellow, i.e.,,,,, are the six essential HTML tags, required in all Web pages
Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course. HTML Code
Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course.
HTML Code Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course.
HTML Code Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course. Link Label Link Descriptio n
HTML Code Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course.
HTML Code Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course.
HTML Code Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course.
HTML Code Imran Hussain's Home Page Imran Hussain Assistant Professor IMT 52-L Gulberg III, Lahore, Pakistan I teach the Introduction to Computing course.
This HTML document was developed in a plain-text editor called notepad
After typing the code into notepad, I saved it as index.htm To check if I have done everything right, I double clicked on icon of the saved file index.htm Double clicking on the icon launched the Web browser displaying my index.htm
My Web page is done!
Problem! My Web page is visible only on my computer. It would be nice if it was also visible on the computers of all my friends and relatives as well.
Solution! I need to upload my Web page to a Web server that is connected to the Internet As a result, my Web page will become accessible to anyone with a computer hooked up to the Internet
Upload Process I used ftp to upload my Web page to the IMT Web server
My Web page is now accessible from all of the millions of computers connected to the Internet
Developing Your Own Web Page Step 1 Open notepad, type in the HTML code, and save it as index.htm on your PC’s Desktop
Developing Your Own Web Page Step 2 Log on to the UMT Web server and upload that index.htm from your PC’s Desktop to your account on that Web server
That is it! Your Web page is now accessible on the Internet through the URL: where xxxxxxxxx is your user ID
…
HTML tags that go in the HEAD portion of a Web page
…
…
HTML tags that go in the BODY portion of a Web page
…
… Paragraph
Line break
… Bold text
label Anchor (Anchors are used to embed links in a Web page)
label –Displays the Web page specified by the link –example: “ mailto: –Sends an to the specified address –example:
label label can be any text string
HTML Code I am at the IMT. You can send me an by clicking here. Browser Display I am at the IMT. You can send me an by clicking here.
Single Tags with Attributes Example:
Paired Tags … Example: …
Paired Tags with Attributes … Example: …
HTML Code SimCity Quake Bridge SimCity Quake Bridge Browser Display
Un-ordered List Line Item
The default “bullet” for these lists is a “disc” That, however, can be changed to a “circle” or a “square” with the help of the type attribute
HTML Code SimCity Quake Bridge SimCity Quake Bridge Browser Display
type = “square”
Q: What happens if I start a new list without closing the original one? SimCity Quake II SimCity 3000 Quake III Bridge
SimCity Quake II SimCity 3000 Quake III Bridge Browser Display 1.Different bullets 2.Additional tab
Such structures, i.e., those in which a new one starts before the first list is finished, are called Nested Lists
Types of Lists In addition to un-ordered lists, HTML supports two other types –Ordered Lists –Definition List
Ordered List SimCity Quake Bridge 1.SimCity 2.Quake 3.Bridge Browser Display Numbers instead of discs, circles or squares OL instead of UL
Ordered List SimCity Quake Bridge a.SimCity b.Quake c.Bridge Browser Display
Ordered List Types typeResult “A”A, B, C, … “a”a, b, c, … “I”I, II, III, IV, … “i”i, ii, iii, iv, … “1”1, 2, 3, …
Q: How would one start an ordered list with a number other than SimCity 26. Quake 27. Bridge Browser Display
Ordered List SimCity Quake Bridge 25. SimCity 26. Quake 27. Bridge Browser Display
Definition List SimCity A great simulation game in which one build cities Quake One of the best of the shoot- em-up genre SimCity A great simulation game in which one build cities Quake One of the best of the shoot-em-up genre Browser Display Term Definition
Definition List Term Definition
Ordered lists as well as definition lists can be nested just like the un- ordered lists Can any type of list be nested into any other type?
Lists are one way of presenting data in a an ordered or formal fashion Tables provide another - more customizable - way of displaying ordered information on Web pages
Browser Display IndoorOutdoor SquashCricket
HTML Code Indoor Outdoor Squash Cricket Browser Display IndoorOutdoor SquashCricket
Table (made up of rows) Row (made up of data cells) Heading Data Cell (Can contain paragraphs, images, lists, forms, tables) Data Cell (Can contain paragraphs, images, lists, forms, tables)
Attributes BORDER –Determines the thickness of the table border –Example: CELLPADING –Determines the distance between the border of a cell and the contents of the cell –Example: CELLSPACING –Determines the empty spacing between the borders of two adjacent cells –Example:
HTML Code Indoor Outdoor Squash Cricket Browser Display IndoorOutdoor SquashCricket
HTML Code Indoor Outdoor Squash Cricket Browser Display IndoorOutdoor SquashCricket
,,, Attributes ALIGN –Possible values: Center, Left, Right –Example: BGCOLOR –Example: WIDTH –Example: HEIGHT –Example: 40% of the window width
Attributes VLAIGN –Determines the vertical alignment of the contents of all of the cells in a particular row –Possible values: Top, Middle, Bottom –Example:
& Attributes NOWRAP –Extend the width of a cell, if necessary, to fit the contents of the cell in a single line –Example: ROWSPAN –No. of rows the current cell should extend itself downward –Example: COLSPAN –The number of columns the current cell should extend itself –Example: VALIGN –Same as that for
HTML Code Indoor Outdoor Squash Cricket Browser Display Indoor Outdoor SquashCricket
YearQuarter ExpensesIncome QuettaDubaiQuettaDubai ,9008,6509,0007,780 22,2308,6508,5008,670 34,0008,6509,9009,870 42,2008,6509,8009, ,7808,6507,7809,000 28,6708,6508,6708,500 39,8708,6509,8709, ,6509,9009,800
HTML Code My favorite sports Squash Cricket Browser Display SquashCricket My favorite sports Caption must be placed immediately after the tag
What have we learned today? 1.We now know how Web pages are built using HTML 2.We also know how to make our personal Web pages available to everyone on the Internet
Useful URL HTML for the Conceptually Challenged