Anda di halaman 1dari 20

KKK 3505 Internet Programming

Pn Siti Mariam Shafie mariam@eng.upm.edu.my

Schedule
Lectures Mon
Wed Fri Consultation Hours Fri Tue

8.00 9.00 am
8.00 9.00 am 8.00 9.00 am 11.00 12.00 2.00 3.00

BKB 107B
BKB 107B BKB 107B Multimedia Lab

Reference Books
1. Internet and World Wide Web How to Program, Deitel and Deitel 2. Programming the World Wide Web, 2nd Edition, Robert W. Sebesta 3. Mastering HTML 4, 2nd Edition, D.S. Ray and E.J. Ray 4. Learning XML: Guide to Creating Self Describing Data, Erik T. Ray

Syllabus
1. 2. 3. 4. HTML SGML AND XML JAVASCRIPT PERL/CGI

Assessment
Assignment : 20% Mini Project : 10% Test I : 20 % Test II : 20% Final : 30 %

What is the Internet?


Internet is a collection of millions of computers, all linked together on a computer network. The network allows all of the computers to communicate with one another using TCP/IP (Transmission Control Protocol/Internet Protocol)

A home computer may be linked to the Internet using a phone-line modem, DSL or cable modem that talks to an Internet service provider (ISP).

What is an IP Address?
Every computer connected to Internet has unique IP address The Internet Protocol (IP) address is a unique 32-bit number Written as four 8-bit numbers, separated by periods eg: 192.168.0.12

What are Domain Names?


Because most people have trouble remembering the strings of numbers that make up an IP addresses, then all servers have human readablenames called domain names There maybe two, three or more domain names. eg: www.eng.upm.edu.my defines a computer called eng, located in UPM, an educational institution in Malaysia where www is a host name.

The host name and all the domain names are together called a fully qualified domain name.

World Wide Web (WWW)


Known as WWW or Web or W3
It is a system that allow people around the world to use the Internet to exchange documents via http, ftp, telnet Allows computer users to locate and view documents (text, graphics, animations, audios, videos)

Web Browsers
Documents provided by servers on the Web are requested by browsers, which are programs running on client machines Microsoft Internet Explorer and Netscape Navigator are the most popular web browsers.

Web Servers
Web servers are programs that provide documents to requesting browsers.
The most commonly used Web servers are Apache and Internet Information Server (IIS) from Microsoft

Uniform Resource Locator (URL)


Used to identify documents on the Internet General format: scheme:object-address Scheme is often a communications protocol include http, ftp, gopher, telnet, file, mailto and news http protocol supports the Web used to request and send HTML documents. eg: http://www.eng.upm.edu.my

Tools for creating HTML documents


HTML editor
Notepad

WYSIWYG HTML editor


FrontPage Dreamweaver

HTML - Introduction
HTML has a central role in the Web A simple format for describing the structure of hypertext or hypermedia documents - plain text (ASCII) files with embedded codes for logical markup Not designed to be the language of a WYSIWYG word processor such as Word or WordPerfect Formally an SGML (Standard Generalized Markup Language) application

Basics HTML tags


In HTML, the document is structured into elements, marked up by tags that are keywords contained in pairs of angle brackets. Each document is structured into two parts - <head> and <body>. The head contains the information which is information about the document that is not generally displayed with the document, such as its <title>. The body contains the actual text that is made up of paragraphs, lists, and other elements. The contents of the body is displayed in a browser window.

Basics HTML tags


Every HTML document should contain certain standard elements. The required elements are:
<html></html> encloses the entire document and defines it as HTML document. <head></head> comes after the opening <html> tag and contains the <title>. <title></title> contains the name of the document and must be enclosed by <head> tags. <body></body> contains all the rest of the document.

The minimal HTML document could contain just those elements (such document, however, will remain empty on screen, since its body is empty)

Example 1: Minimal HTML document <html> <head> <title>Internet programming</title> </head> <body> </body> </html>

Document head
The head element contains general information, or meta-information, about the document. What element can appear in the head depends on HTML version. Some elements: <title>
The title of the document. All document must have a title.

<base>
A record of the original URI of the document: this allows you to move the document to a new location and have relative URIs access the appropriate place with respect to the original URI.

<link>
Defines the relationship(s) between this document and another or others. A document can have several <link> elements.

<meta>
A container for document metainformation.

<style>
Stylesheet instructions, written in a stylesheet language. Stylesheet instructions specify how the document should be formatted for display.

<script>
A code of client-side script in the document. Example languages are JavaScript and VBScript.

Example 1: Sample head of HTML document

<head> <title>Internet programming</title> <base href="http://www.it.lut.fi/index.html"> <link rel="stylesheet" type="text/css" ref="courses.css"> <link href="toc.html" rel="contents"> <link href="slide2.html" rel="next"> <style> BODY,TD,TH,UL,DL,OL,H1,H2,H3,H4 { font-family: Arial, Helvetica, sans-serif; } .smaller { font-size: 9pt; } </style> <script type="text/javascript" src="foo.js" charset="ISO-88591"> <!-// embedded script, only executed if foo.js is unavailable document.write("foo is gone"); // --> </script> </head>