Data Expressions(2) - Chapter 2: Data and Expressions (2)...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 2: Data and Expressions (2) Lab Exercises Topics Lab Exercises HTML Introduction to HTML Applets Drawing Shapes Colors Drawing a Face Chapter 2: Data and Expressions 1 Introduction to HTML HTML is the HyperText Markup Language. It is used to describe how text, images, and multimedia are displayed by Web browsers. In this lab you will learn a little about HTML so that you can create a web page containing headings, interesting fonts, lists, and links as well as applets. HTML uses tags to describe the layout of a document; the browser then uses these tags to figure out how to display the document. Tags are enclosed in angle brackets. For example, <title> is a tag that indicates that this section contains the title of the document. Many tags, including <title>, have corresponding end tags that indicate where the section ends. The end tags look just like the start tags except that they start with the character /, e.g., </title>. So the following text indicates that the title of the document is Introduction to HTML : <title>Introduction to HTML</title> There are a few tags that almost every document will have: <html>, <head>, <title>, and <body>. Here is an example of a simple HTML document: <HTML> <HEAD> <TITLE>Introduction to HTML</TITLE> </HEAD> <BODY> In this lab you will learn about HTML, which is lots of fun to use. In particular, you will learn how to use fonts, paragraphs, lists, links and applets in a web page. Now you can make your own web page for your friends to visit! </BODY> </HTML> To see what this looks like, open the file in the web browser. Change the size of the browser window (click and drag any corner) and see how the text is reformatted as the window changes. Note that the title appears on the window, not as part of the document. The HEAD of a document (everything between <HEAD> and </HEAD>) contains the introduction to the document. The title goes in the head, but for now we won't use the head for anything else. The BODY of a document (everything between <BODY> and </BODY>) contains everything that will be displayed as part of the document. Both the HEAD and the BODY are enclosed by the HTML tags, which begin and end the document. This document contains only plain text, but an HTML document can have much more structure: headings, paragraphs, lists, bold and italic text, images, links, tables, and so on. Here is a document containing a heading, two paragraphs, and some fancy fonts: 2 Chapter 2: Data and Expressions <HTML> <HEAD> <TITLE>Introduction to HTML</TITLE> </HEAD> <BODY BGCOLOR="lightgreen"> <H1 align="center">Introduction to HTML</H1> <P>In this lab you will learn about <I>HTML</I>, which is lots of fun to use. In particular, you will learn how to use fonts, paragraphs, lists, links, and colors in a web page. Now you can make your <B>own</B> web page for your friends to visit!</P>can make your <B>own</B> web page for your friends to visit!...
View Full Document

This note was uploaded on 03/31/2010 for the course CPSC 1301 taught by Professor Khan,s during the Spring '08 term at Columbus State University.

Page1 / 7

Data Expressions(2) - Chapter 2: Data and Expressions (2)...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online