Presentation on theme: "Presenting Information on WWW using HTML. Presenting Information on the Web with HTML How Web sites are organized and implemented A brief introduction."— Presentation transcript:
Presenting Information on the Web with HTML How Web sites are organized and implemented A brief introduction to HTML A Closer Look at HTML Document How to use URLs, Anchor Tags, and Document References Tables, Lists, Forms
Introduction to HTML An HTML document consists of lines of text with embedded markup tags that specify Web-page formatting and links to other pages Invented by Tim Berners-Lee at CERN 1989 – The birth of the World Wide Web
Introduction to HTML In 1993, students, faculty, and staff of the National Center for Supercomputing Applications (NCSA) developed the first graphical browser – Mosaic Web browser and Web server – Became Netscape Current version is HTML (HTML 4.01 – http://www.w3.org/TR/html401/ – 10 minutes for new commers: http://www.w3.org/MarkUp/Guide/
A Closer Look at HTML Documents HTML documents are structured using tags, attributes, and nesting – Tag with text: text BigHit Video Online Reservation System Enter Video Reservation System – Tag with no text: – Nested tags:
URLs, Anchor Tags, and Document References http://www.w3.org/TR/REC-html40/ Protocol Host Machine Name
URLs, Anchor Tags, and Document References URL (Uniform Resource Locator) – A protocol, a mechanism used to fetch the desired object. In this case: http (Hypertext Transfer Protocol). – The host machine, the computer that contains the requested object. In this case, the host computer is www.w3.org. Special host name for browser computer: localhost – The object name. In this case, /TR/REC-html40/.
Relative URLs Relative URL contains only object name – Refers to object on the same server as the page with the reference For page URL http://www.web4data.com/dbmgmt/bighit/fig1002.ht ml – Base URL is http://www.web4data.com/dbmgmt/bighit/ – Protocol http, host machine www.web4data.com, directory /dbmgmt/bighit/
Relative URLs Relative URL not starting with / – Refers to object relative to directory containing the page – Create full URL by appending relative URL to base URL images/bighit.jpg becomes http://www.web4data.com/dbmgmt/bighit/images/bighit.jpg Relative URL starting with / – Refers to object relative to home directory of server – Create full URL by appending the relative URL to the protocol and host machine /dbmgt/bighit/index.html becomes http://www.web4data.com/dbmgmt/bighit/index.html
Fundamentals of HTML HTML, HEAD, Title, Body Headings and paragraphs Add emphasis to your text Use various kinds of lists Add links to other pages Add images Add links to other pages
and The tag is the first tag in your document. It tells the Internet browser that it is reading an HTML document (without it, the browser would think it was viewing a text document). This is the closing tag for the tag. This should be the last line in your HTML document.
and Used to contain information such as title, style sheets : This is the closing tag.
and – It is used to make the title of the page. The title of the page will appear in the blue bar across the top of your active window Example: Basic HTML
and We put all your text, images, and links between the opening and closing tags.
Headings and paragraphs There are up to six levels of headers that can be used in your document, H1 through H6. Header 1 is the largest header and they get progressively smaller through header 6.
Example This is a header 1 tag This is a header 2 tag
Add emphasis to your text Boldface This is a boldface tag. Italics This is an italic tag.
Lists Numbered list item 1 list item 2 list item 3
Lists Unumbered: list item 1 list item 2 list item 3
Lists Definition lists allow you to indent without necessarily having to use bullets. This is a term This is a definition And yet another definition Another term Another definition
Center You can center text, images, and headings with the center tag: This is a centered sentence The center tag automatically inserts a line break after the closing center tag.
File names Use lowercase file names User proper extension: – *.html or *.htm
Designing a web site Determine the purpose of the web site Determine the target audience Determine numbers of pages Sketch the site on paper
Presenting Information in HTML Tables Table tags provide the primary method of organizing information on pages – Table tags create a regular, rectangular layout – Table tags present tabular information Table is surrounded by – Attributes border and bgcolor –
Table tags (continue) Row is surrounded by Data cell is surrounded by Table heading is surrounded by Example: Year Sales 2000 $18M 2001 $25M 2002 $36M
Coloring your tables Use Style sheet Use background color attribute Determine HEX value for color
Coloring a table Year Sales 2000 $18M 2001 $25M
Color Each color is identified by its Red- Green- Blue (RGB) values, three numbers that range from 0 to 255, each of which represents the intensity of the Red, Green, or Blue component of the desired color. We need to represent each color in hexadecimal (0-F)