HTML Documents Basic

MODULE I

HTML Document Tags for Font & Paragraph Formatting Lists, Tables

Frames, Image Maps

Cascading Style sheets - Style Elements, Inline Style Sheets, Embedding Style Sheets, External Style Sheets

CLASS Attribute, Absolute & relative positioning of elements, DIV and SPAN tags.

MODULE II

Dynamic HTML pages Client side scripting, Java Script-variables, Arithmetic operations-message boxes, Arrays, control statements

Functions, event handling, document object model.

Dynamic updating of pages with Java Script.

Embedding ActiveX controls-using the structured graphics-ActiveX Control.

Module I

Lecture #1

1) Synopsis: HTML Documents Basic Tags for Font & Paragraph

2) Target:

At the completion of this lecture you should be able to answer questions like:

(a) What are HTML tags?

(b) What tags are used to create different fonts size?.

(c) How do you create a paragraph in a HTML page?

3) Introduction

With the advent of intranet and World Wide Web, new technologies have emerged. E-commerce (Electronic commerce) has begun to dominate the business and financial industries.

One of the easiest languages to create web pages is HTML. JavaScript is a condensed programming language that s especially designed for developing Internet and web based applications.

4) Revision / Prerequisites

HTML is about how to create pages on the web. A brief overview about browsers will be good for a beginning, though this lecture gives an idea about these terms also.

Also refer pages 11 to 88 of INTERNET & WORLD WIDE WEB- HOW TO PROGRAM by Dietel, Dietel & Nieto.

5. 1) Concepts

Terms

Before we study in detail about HTML let us get introduced to some terms which will be commonly be used here.

Files that travel across the largest network in the world, the Internet, and carry information from a server to a client are called the web pages.

Server is a machine which sends the file to requested machine or client.

The individual who develops these web pages are called the web developers.

Web pages are created using HTML syntax. All these pages are organized and stored in the HDD of the central computer called the Server. They act like service providers and run special software called web server software that allows:

· Web site management

· Accept client’s requests for information

· Respond to a client’s request for providing the pages with the required information

Example of web server software is IIS (Intranet Information Server), Apache Web Server, Netscape Server, Microsoft Personal Web Server.

Web Server software stores and manages web pages. When required the Web Server accepts requests for these Web pages, retrieves from the HDD, and sends it to the client who recommended it.

To access information stored in the form of web pages, users must connect to a Web Server. Computers offering facility to read information stored in web pages are called ‘Web Clients’.

Web Clients run a special software called ‘Browser’ that allows them to :

  • Connect to an appropriate Server
  • Query the server for the information to be read
  • Provides an interface to read the information returned by the server.

Eg. Netscape Communicator, Internet Explorer.

Now, one question that arises is:

How does a Browser communicate with a Web Server?

Web server is responsible for sending web pages to a browser on a client machine. Browser communicates with a Web Server by a 4 step HTTP transaction.

1) Establish a connection

Client machine is given the IP address of the Server and the sub protocol that must be used i.e.) HTTP, FTP etc.

2) Client issues a request and server sends a Response

Browser connects to a Web Server using the appropriate protocol name, IP address and port no. When the Web Server gets connected, the Web Server then dispatches the ‘Default Web Document’ to the client machine.

3) Server terminates the connection

It is the Server’s responsibility to terminate the TCP/IP connection with the Browser after the Browser’s request has been met.

5. 2) HTML

HyperText Markup Language is about how a web browser displays its multimedia documents. The documents are plain text files (ASCII) with special tags or codes that a browser only knows how to interpret and display on your screen.

The current set of proposed standards is HTML 4.0 which contains more features for HTML and some attempts to reduce the complexities of different web browsers.

What are HTML tags?

When a web browser displays a page it reads from a plain text file, and looks for special codes or "tags" that are marked by the < and > signs. The general format for a HTML tag is:

     <tag_name>string of text
 

Example:

     

What are HTML tags?

 

This tag tells a web browser to display the text What are HTML tags? in the style of header level 3. We should note that the ending tag,

 
    

contains the "/" slash character. This "/" slash tells a web browser to stop tagging the text.

HTML is not case-sensitive. But there are exceptions like in escape sequence. All tags are not supported by WWW browsers. If a browser does not support the tag, then it will just ignore it.

Every HTML document consists of certain standard HTML tags. Each document consists of

· Head

Ø Title

· Body

Ø Actual text consisting of paragraphs, lists and other elements

An example consisting of these tags is shown below:

 
    
        A Simple HTML Example
    
    
        

HTML is Easy To Learn

        

Welcome to the world of HTML.

               This is the first paragraph. 
        

         

And this is the second paragraph.

    
    

Now to view the HTML document, we should create a file. Follow the steps given to see your first web page:

1. Launch a text editor program.

2. Go to the text editor window.

3. Enter the HTML program code.

4. Save the document as “filename.html”.

5. Open the web browser window.

6. Click the browse button.

7. Find the file you have created and open it.

8. You should will see in the title bar of the workspace window the text “A Simple HTML Example” and in the web page below is the paragraph written in the tags

. . . .

.

5. 3) Tags

Let us now learn about a few tags which are used in font.

5. 3. 1) The format for an HTML heading is :

your text to appear

where N is a number varying from 1 to 6 which identifies the heading size. heading 1 is the largest heading.

5. 3. 2) The web browser ignores all carriage returns typed in the text editor. But a

paragraph tag inserts a blank line and starts a new paragraph. The HTML code

is:

. . . . . .

A tag to create a break in the text is horizontal rule:


It inserts a straight line in the specified area.

Another tag to force the text to a new line without inserting a blank line is the break tag.


A web browser can also display certain text in different styles like Italic & bold.

The style tags is displayed in the table below along with their tags

Font Style

Tags

Bold

. . . . .

Italic

. . . . .

Typewriter Font

. . . . .

These are the physical tags which indicate the specific appearance of a section.

Another type of style tags are the logical tags which tags the text according to their meaning.

for a word being defined. Typically displayed in italics.

for emphasis. Typically displayed in italics.

for titles of books, films, etc. Typically displayed in italics.

for computer code. Displayed in a fixed-width font.

for user keyboard entry. Typically displayed in plain fixed-width font.

for a sequence of literal characters. Displayed in a fixed-width font.

for strong emphasis. Typically displayed in bold.

for a variable, where you will replace the variable with specific information. Typically displayed in italics.

These are a few of the tags which are used for fonts and paragraphs. The rest of the tags will be taught naturally as the class on HTML continues.

6) Summary

In this lecture we have learnt tags which are essential to create a web page with different fonts. Also creating paragraphs was dealt with.

7) Exercise questions

1) Why should you be concerned about differences in HTML standards?

2) What are HTML tags?

3) Where is the text of the title tag displayed?

4) What steps are involved in creating a simple HTML document?

5) How do you create a comment tag?

6) How can you display your HTML document in a web browser?

8) Programming / Computational assignments

  1. Create your own web page with the tags taught in the above lecture. Create a HTML text file that includes a tag and a few sentences describing yourself. Save the HTML file and load into the web browser. </li></ol> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: center;" align="center"><b style=""><u><span style="font-size: 14pt;">Lecture #2<o:p></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">1) <u>Synopsis</u></b>: Formatting Lists, Tables</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">2) <u>Target</u>:</b> </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify; text-indent: 21pt;">At the completion of this lecture you should be able to answer questions like:</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(a)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Why do we use lists? </p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(b)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Can we create tables without any border?</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(c)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Can the width of a particular cell in a table be changed?</p> <p class="MsoNormal" style="text-align: justify;"><b style=""><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style="">3) <u>Introduction<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span>Lists and tables are created in HTML using tags. Basic tag is dealt with in the previous lecture. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">4) <u>Revision / Prerequisites<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Also refer pages 98 to 114 of INTERNET & WORLD WIDE WEB- HOW TO PROGRAM by Dietel, Dietel & Nieto. <span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 1) <u>Concepts<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify; text-indent: 18pt;">Web pages display a list of items. HTML supports 3 types of lists. </p> <ul style="margin-top: 0cm;" type="disc"><li class="MsoNormal" style="text-align: justify;">Bulleted list / unordered list</li><li class="MsoNormal" style="text-align: justify;">Numbered list / ordered list</li><li class="MsoNormal" style="text-align: justify;">Definition list</li></ul> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="1" type="1"><li class="MsoNormal" style="text-align: justify;"><b style="">Unordered Lists <o:p></o:p></b></li></ol> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 18pt;">Unordered lists are the ones which appear as a list of items with bullets or markers. The bullet mark will depend on the version of our web browser. </p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>To create an unnumbered bulleted list, </p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">a)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Use an <UL> tag (Unordered List). </p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">b)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Enter a <LI> tag (List Item) for each individual list item. No closing tag is required here. </p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">c)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->End the list by closing the </UL> tag. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">Example:</p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(49, 61, 65);"><span style=""> </span></span><span style="color: rgb(49, 61, 65);"><UL><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span><LI> apples<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span><LI> bananas<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span><LI> grapefruit<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span></UL><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 36pt; text-indent: 36pt; line-height: 135%;"><span style="color: rgb(49, 61, 65);"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-left: 36pt; text-indent: 36pt; line-height: 135%;"><span style="color: rgb(49, 61, 65);">The output is: <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 126pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol; color: rgb(49, 61, 65);"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: rgb(49, 61, 65);">apples <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 126pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol; color: rgb(49, 61, 65);"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: rgb(49, 61, 65);">bananas <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 126pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: rgb(49, 61, 65);">grapefruit</span><span style="font-size: 9pt; font-family: Verdana; color: rgb(49, 61, 65);"> </span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);">The shape of the bullet can be changed by using the attribute type along with the tag <ul><o:p></o:p></span></p> <pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><ul type=xxxx><o:p></o:p></span></pre> <p style="margin-left: 72pt; text-indent: 36pt;">where <tt><span style="font-size: 10pt;">xxxx</span></tt> can be:</p> <p class="MsoNormal" style="margin-left: 144pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: "Courier New";"><span style="">o<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><tt><span style="font-size: 10pt;">type=circle</span></tt> </p> <ul type="square"><ul type="circle"><ul type="square"><ul type="square"><li class="MsoNormal" style=""><tt><span style="font-size: 10pt;">type=square</span></tt> </li></ul></ul></ul></ul> <ul type="disc"><ul type="circle"><ul type="square"><ul type="square"><li class="MsoNormal" style=""><tt><span style="font-size: 10pt;">type=disc</span></tt> [default bullet for top level list] </li></ul></ul></ul></ul> <ol style="margin-top: 0cm;" start="2" type="1"><li class="MsoNormal" style="text-align: justify;"><b style="">Ordered Lists<o:p></o:p></b></li></ol> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify;"><span style=""> </span>Here the browser numbers each successive list item starting with “1”. The only difference is changing the UL tag to OL tag(Ordered List).<span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>To create an ordered list </p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">a)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Use an <OL> tag. </p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">b)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Enter a <LI> tag for each individual list item. No closing tag is required here. </p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">c)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->End the list by closing the </OL> tag. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(49, 61, 65);"><span style=""> </span></span><span style="color: rgb(49, 61, 65);">Example:<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><OL><o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span><LI> oranges<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span><LI> peaches<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span><span style=""> </span><LI> grapes<o:p></o:p></span></p> <p class="MsoNormal" style=""><span style="color: rgb(49, 61, 65);"><span style=""> </span><span style=""> </span></OL><o:p></o:p></span></p> <p class="MsoNormal" style="margin: 9.6pt 0cm 9.6pt 36pt; line-height: 135%;"><span style="color: rgb(49, 61, 65);"><span style=""> </span>The output is: <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 108pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="color: rgb(49, 61, 65);"><span style="">1.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: rgb(49, 61, 65);">oranges <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 108pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="color: rgb(49, 61, 65);"><span style="">2.<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="color: rgb(49, 61, 65);">peaches <o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 108pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="">3.<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]--><span style="color: rgb(49, 61, 65);">grapes </span></p> <p class="MsoNormal" style="text-indent: 36pt;"><span style="color: rgb(49, 61, 65);">The values used can be changed by using attribute type in the tag <ol><o:p></o:p></span></p> <p class="MsoNormal"><span style="color: rgb(49, 61, 65);"><span style=""> </span><ol type=A> <o:p></o:p></span></p> <p class="MsoNormal"><span style="color: rgb(49, 61, 65);"><span style=""> </span>or<span style=""> </span><ol type=a><span style=""> </span>etc. <o:p></o:p></span></p> <p class="MsoNormal"><span style="color: rgb(49, 61, 65);"><o:p> </o:p></span></p> <ol style="margin-top: 0cm;" start="3" type="1"><li class="MsoNormal" style="text-align: justify;"><b style="">Definition List<o:p></o:p></b></li></ol> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;">This list allows you to list terms and their definitions. This list starts with a <dl> (definition List) tag and ends with </dl>. Each term starts with a <dt> (definition term) tag and each definition starts with a <dd> (definition data).</p> <p class="MsoNormal" style=""><b><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><dl><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><span style=""> </span><dt>the first term</dt><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><dd>its definition</dd><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><o:p> </o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><span style=""> </span><dt>the second term</dt><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><dd>its definition</dd><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><o:p> </o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><dt>the third term</dt><o:p></o:p></b></p> <p class="MsoNormal" style=""><b><span style=""> </span><span style=""> </span><dd>its definition</dd><o:p></o:p></b></p> <p class="MsoNormal" style="text-indent: 36pt;"><b></dl><o:p></o:p></b></p> <p class="MsoNormal" style="text-indent: 36pt;"><b><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;"><span style="">The end tags are optional in the case of </dt> & </dd>.<o:p></o:p></span></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;"><span style=""><o:p> </o:p></span></p> <p class="MsoNormal" style="text-align: justify;"><span style="">Lists can be nested one within another.<o:p></o:p></span></p> <p class="MsoNormal" style="text-indent: 36pt;"><b><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5.2) Tables<o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>A table can be created using the HTML tags. A table uses three basic tags which all tables must have:</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><TABLE ……></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span><span style=""> </span>This tag creates the table. The dots represent some properties of the table which</p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;"><span style=""> </span>can be given to the table like the borders and background.<span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><TR …..></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>This tag is the Table Row which defines each row of the table.</p> <p class="MsoNormal" style="text-align: justify;"><TD …..></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>This is the Table Data which defines each cell of the table.</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">Additional properties can be given to the table by giving attributes. Border is an attribute which can give a border to a table.</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 72pt; text-align: justify; text-indent: 36pt;"><table border=2></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -36pt;">If you do not want any border for your table then give the value as 0. </p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -36pt;">The size of the table can be specified by </p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -36pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;"><span style=""> </span><table border=2 width=”50%”></p> <p class="MsoNormal" style="text-align: justify;">which indicates 50% of the page width. We can also enter in terms of the pixel as:</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;"><span style=""> </span><table border=2 width=50></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -36pt;">The height of the table can also be specified as:</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -36pt;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;"><span style=""> </span><table border=2 width=50 height=75></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -36pt;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">Horizontal alignment in the table cell can be done by giving attributes like</p> <ul type="disc"><li class="MsoNormal" style="margin-right: -36pt;"><tt><span style="font-size: 10pt;"><td align=left></span></tt> <span style=""> </span><span style=""> </span>aligns all elements to the left side of the cell (default)</li><li class="MsoNormal" style=""><tt><span style="font-size: 10pt;"><td align=right><span style=""> </span></span></tt> aligns all elements to the right side of the cell </li><li class="MsoNormal" style=""><tt><span style="font-size: 10pt;"><td align=center></span></tt> <span style=""> </span><span style=""> </span>aligns all elements to center of the cell </li></ul> <p class="MsoNormal" style="">Vertical alignment can be done in the cell by using attributes:</p> <ul type="disc"><li class="MsoNormal" style=""><tt><span style="font-size: 10pt;"><td valign=top></span></tt> <span style=""> </span>aligns all elements to the top of the cell </li><li class="MsoNormal" style=""><tt><span style="font-size: 10pt;"><td valign=bottom><span style=""> </span></span></tt>aligns all elements to the bottom of the cell </li><li class="MsoNormal" style="margin-right: -36pt;"><tt><span style="font-size: 10pt;"><td valign=middle><span style=""> </span></span></tt>aligns all elements to the middle of the cell(default) </li></ul> <p class="MsoNormal" style="">The above tags help to create an ordinary table. </p> <p class="MsoNormal" style=""><b style="">What happens if we want to create a table with varying column sizes or row sizes?<o:p></o:p></b></p> <p class="MsoNormal" style="">We have to use attributes like colspan and rowspan in the <td>. . . . </td> tags. Let us get to know this attribute by an example. </p> <pre style="margin-left: 81pt; text-indent: -18pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><table border><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><tr><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 1 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 1</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><b><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td align=center colspan=2><o:p></o:p></span></b></pre><pre style="margin-left: 81pt;"><b><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span>Row 1 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 2-3</td></span></b><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span></tr><o:p></o:p></span></pre><pre style="margin-left: 81pt; text-indent: 36pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p> </o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><tr><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 2 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 1</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 2 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 2</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 2 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 3</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span></tr><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><tr><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 3 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 1</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 3 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 2</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><td>Row 3 <st1:place w:st="on"><st1:state w:st="on">Col</st1:state></st1:place> 3</td><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span></tr><o:p></o:p></span></pre><pre style="margin-left: 81pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"></table><o:p></o:p></span></pre> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style=""><o:p> </o:p></p> <p class="MsoNormal" style="">The output of the above HTML tag is:</p> <p class="MsoNormal" style=""><span style=""> </span><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:205.5pt; height:79.5pt'> <v:imagedata src="file:///C:\DOCUME~1\2NDCLI~1\LOCALS~1\Temp\msohtml1\01\clip_image001.png" o:title=""/> </v:shape><![endif]--><!--[if !vml]--><img src="file:///C:/DOCUME%7E1/2NDCLI%7E1/LOCALS%7E1/Temp/msohtml1/01/clip_image002.jpg" v:shapes="_x0000_i1025" width="274" height="106"><!--[endif]--></p> <p class="MsoNormal" style="text-align: justify;">Browsers also help to specify the settings for the lines that make up the table:</p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><table border=X cellpadding=Y cellspacing=Z></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">where attribute cellpadding specifies how much empty space exists between items in the cells and the walls of the cells. Attribute cellspacing specifies the width between the inner lines that divide the cells (in pixels). </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">6) <u>Summary<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>This lecture dealt with creation of lists. Lists can be ordered, unordered and definition type. Tags to create tables and spacing in the cells and rows were also studied in this lecture. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">7) <u>Exercise questions</u><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <ol style="margin-top: 0cm;" start="1" type="1"><li class="MsoNormal" style="">What is the order in which a web browser interprets the elements of a table tag? </li><li class="MsoNormal" style="">What is the difference between <tt><b><span style="font-size: 10pt;"><td>...</td></span></b></tt> and <tt><b><span style="font-size: 10pt;"><th>...</th></span></b></tt> tags? </li><li class="MsoNormal" style="">Where does the <tt><b><span style="font-size: 10pt;">colspan=X</span></b></tt> attribute go? What does it do? </li><li class="MsoNormal" style="">How do you create a table that has no visible margins? </li><li class="MsoNormal" style="">How do you color a single row of a table? </li><li class="MsoNormal" style="">How can you use a pattern as a background in the last row of your table? for all cells in your table? </li></ol> <h1>8) <u>Programming / Computational assignments<o:p></o:p></u></h1> <p class="MsoNormal" style="text-align: justify;"><b><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">1)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]--><span style=""> </span>Create a web page which uses the table tag. The table should contain details of your B. Tech degree semester wise result and percentage of marks. Also include a list of hobbies that you are interested in. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: center;" align="center"><b style=""><u><span style="font-size: 14pt;">Lecture #3<o:p></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">1) <u>Synopsis</u></b>: Frames, Image Maps</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">2) <u>Target</u>:</b> </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify; text-indent: 21pt;">At the completion of this lecture you should be able to answer questions like:</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(a)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Why are frames used in a web document? </p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(b)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Can we load images in our web pages?</p> <p class="MsoNormal" style="text-align: justify;"><b style=""><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style="">3) <u>Introduction<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span>Tags are present which will create Frames. Frames help us to load more than a document on a web page. The tags used in the previous classes can be helpful to create a good frame. Small individual images on a single web document can be clicked to link further. These tags are dealt with in this lecture. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">4) <u>Revision / Prerequisites<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Also refer pages 121 to128 of INTERNET & WORLD WIDE WEB- HOW TO PROGRAM by Dietel, Dietel & Nieto. <span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 1) <u>Concepts<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span>Frames<o:p></o:p></b></p> <p style="margin: 0cm 0cm 0.0001pt; text-align: justify;"><span style=""> </span>A frame uses tag <frameset> to create frames. The number of frames the document requires can be given by using attribute cols & rows. Each frame can contain different documents or links which can be connected to the main document by using the tag <frame src=”frame_name”></p> <p style="margin: 0cm 0cm 0.0001pt; text-align: justify;"><o:p> </o:p></p> <p style="margin: 0cm 0cm 0.0001pt; text-align: justify; text-indent: 45pt;"><frameset cols="120,*" frameborder="0" border="0" framespacing="0"></p> <p style="margin: 0cm 0cm 0.0001pt; text-align: justify; text-indent: 45pt;"><frame src="frame1.htm" name="menu" ></p> <p style="margin: 0cm 0cm 0.0001pt; text-align: justify; text-indent: 45pt;"><frame src="frame2.htm" name="main" ></p> <p style="margin: 0cm 0cm 0.0001pt; text-align: justify; text-indent: 45pt;"></frameset><span style=""> </span></p> <p style="text-align: justify;">We can also specify a target window, that is a window to display the content in. </p> <pre><span style=""> </span><span style="font-size: 12pt; font-family: "Times New Roman";"><a href="url_path.html" target="window_name"><o:p></o:p></span></pre> <p style="text-align: justify;"><a name="target"></a><b>TARGET="frame name"</b>: located inside of a <a href="http://www.tedmontgomery.com/tutorial/frames.html#frameset"><span style="color: windowtext; text-decoration: none;">frameset</span></a>, points to a specific <a href="http://www.tedmontgomery.com/tutorial/frames.html#frame"><span style="color: windowtext; text-decoration: none;">frame</span></a> defined with that “<a href="http://www.tedmontgomery.com/tutorial/frames.html#framename"><span style="color: windowtext; text-decoration: none;">frame name</span></a>.” <a name="_blank"></a></p> <p style="text-align: justify;"> "_BLANK" causes the linked document to load into a whole, newly created browser window which has no name. <a name="_self"></a></p> <p style="text-align: justify;"><span style=""> </span> "_SELF" causes the linked document to load into the same browser window containing the hyperlink. (<i>default)<a name="_parent"></a><o:p></o:p></i></p> <p style="text-align: justify;"> "_PARENT" causes the linked document to load into the parent frameset in which the document containing the hyperlink is located. </p> <p style="text-align: justify;"><a name="_top"></a> "_TOP" causes the linked document to load into the entire browser window. </p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 2)<span style=""> </span>Image Maps<o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">Small graphic images can also act as a hyperlink to some other web page or larger size copy of a picture. It is also possible to embed many different graphic hyperlinks within a larger graphic image. This is called “image mapping.” Clicking these active <i>areas</i> or <i>regions</i> enables the browser to link to different documents or locations. Either an “ISMAP” or a “USEMAP” parameter is placed inside of an <img src> tag to indicate which style of map will be used.</p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">The ISMAP style has certain drawbacks as the entire image used must be a hyperlink. The USEMAP style is supported by all browsers. In this the image used is not a hyperlink but regions of the images are converted to hyperlinks with each having its own URL. </p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">While creating a hyperlink, the web browser places a bounding box around the graphic image. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <pre><span style=""> </span><span style="font-size: 12pt; font-family: "Times New Roman";"><a href="fileX.html"> <img src="graphic.gif"><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><span style=""> </span>Go to Document X</a><o:p></o:p></span></pre> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">where <a> is the anchor tag which refers to another file. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">Spyglass was the first browser built with the capability to handle the calculations and transmit the URL based on the coordinates that were built inside the HTML. This is a client side process whereas previously Image map was a client & server side process. </p> <p>The HTML needed for a client-side clickable image map is:</p> <pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><img src="image.gif" usemap="#map_name"><o:p></o:p></span></pre> <p>where <tt><b><span style="font-family: "Times New Roman";">image.gif</span></b></tt> is the file name of the image and <tt><b><span style="font-family: "Times New Roman";">map_name</span></b></tt> is an anchor link elsewhere in the same HTML file:</p> <pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><map name="map_name"><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><area shape="rect" coords="x1,y1,x2,y2" href=URL1><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span><area shape="rect" coords="x1,y1,x2,y2" href=URL2><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span>:<o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span>:<o:p></o:p></span></pre> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></map></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">Each line in the <map>. . . </map> tag identifies a region which is specified by the coordinates coords. x1, y1 are the horizontal and vertical pixel location for the upper left corner and x2, y2 are the horizontal and vertical pixel locations for the lower right corner. URL1, URL2, . . .<span style=""> </span>are the URLs that the region should correspond to when clicked. The shape can be RECT (Rectangle) / CIRC (Circle) / POLY (Polygon). </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">6) <u>Summary<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><o:p><span style="text-decoration: none;"> </span></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Here we studied why and how frames are built on a web page. They can be useful when we want multiple documents or pages to be open on the same web page. Image map helps us to create an interactive image by creating clickable portions on the images. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">7) <u>Exercise questions</u><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">1)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->What does the <tt><b><span style="font-size: 10pt;"><</span></b></tt><tt><b><span style="font-family: "Times New Roman";">map>...</map></span></b></tt> tag do?</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">2)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Does Image map apply to all types of images?</p> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <h1>8) <u>Programming / Computational assignments<o:p></o:p></u></h1> <p class="MsoNormal" style="text-align: justify;"><b><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">1)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Create 3 different shape on a page and place it in different locations. Clicking on the different shape should link us to pages which has details about that particular shape. Details can have data like area, volume etc. </p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: center;" align="center"><b style=""><u><span style="font-size: 14pt;">Lecture #4<o:p></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">1) <u>Synopsis</u></b>: Cascading Style sheets - Style Elements, Inline Style Sheets, Embedding Style Sheets, External Style Sheets</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">2) <u>Target</u>:</b> </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify; text-indent: 21pt;">At the completion of this lecture you should be able to answer questions like:</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(a)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->What is CSS?</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(b)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Can HTML be more friendly to the user by the use of CSS?</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(c)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Is Java Script a CSS script?</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(d)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Why do we create Style Sheets?</p> <p class="MsoNormal" style="text-align: justify;"><b style=""><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style="">3) <u>Introduction<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span>Style Sheets are powerful mechanisms for adding styles to web documents. They help to enforce standards and uniformity throughout a web site. It helps to make global changes to all documents from a single location. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">4) <u>Revision / Prerequisites<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Also refer pages 497 to 514 of Web Enabled Commercial Application Development Using…. HTML, DHTML, Java Script , Perl CGI<span style=""> </span>by Ivan Bayross. <span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 1) <u>Concepts<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style="">What is CSS?<o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">Cascading Style Sheets or CSS allows you to specify the style of your web page like spacing, margins, colors etc. They also enforce standards and uniformity throughout a web site and also help to create a dynamic effect. With Style Sheets, text and image formatting properties can be predefined in a single list. </p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">The advantage of a Style Sheet is the ability to make global changes to documents from a single location. Style Sheets are said to Cascade when they combine to specify the appearance of a page. </p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">The Style of a page can be done by using the HTML tag <STYLE> <b style="">. . . .</b> </STYLE>. The Style tag is written within the HTML <HEAD> tags. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <pre><span style=""> </span><style type="text/css"></pre><pre> <span style=""> </span><span style=""> </span>body { color: black; background: white; }</pre><pre><span style=""> </span></style></pre><pre><o:p> </o:p></pre> <p class="MsoNormal" style="text-align: justify;">5. 2) <b style="">Style Elements</b></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">The attributes that can be specified with the <STYLE> tag are the </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="1" type="1"><li class="MsoNormal" style="text-align: justify;">Font attribute </li></ol> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <table class="MsoTableGrid" style="margin-left: 59.4pt; border-collapse: collapse; border: medium none;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="width: 162pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Attributes<o:p></o:p></b></p> </td> <td style="width: 162pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Values<o:p></o:p></b></p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Font-family</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Serif, sans-serif, cursive</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Font-style</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Normal, italic, oblique</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Font-weight</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><st1:place w:st="on"><st1:city w:st="on">Normal</st1:city></st1:place>, bold, bolder, lighter</p> <p class="MsoNormal" style="text-align: justify;">Or 100, 200, . . . . , 900</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Font-size</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Size in points, percentage </p> </td> </tr> </tbody></table> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify; text-indent: -18pt;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="2" type="1"><li class="MsoNormal" style="text-align: justify;">Color attribute & Background attribute</li></ol> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <table class="MsoTableGrid" style="margin-left: 59.4pt; border-collapse: collapse; border: medium none;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="width: 162pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Attributes<o:p></o:p></b></p> </td> <td style="width: 162pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Values<o:p></o:p></b></p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Color</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Color name or color code</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Background-color</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Color name or color code</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Background-image</p> </td> <td style="width: 162pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">URL / none</p> </td> </tr> </tbody></table> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="3" type="1"><li class="MsoNormal" style="text-align: justify;">Text attribute</li></ol> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <table class="MsoTableGrid" style="margin-left: 59.4pt; border-collapse: collapse; border: medium none;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="width: 162pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Attributes<o:p></o:p></b></p> </td> <td style="width: 207pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Values<o:p></o:p></b></p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Text-decoration</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">None, underline, overline, line-through, blink</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Vertical-align</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Baseline, sub, super, top, middle, bottom</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Text-transform</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Capitalize, uppercase, lowercase, none</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Text-align</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Left, right, center, justify</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Text-indent</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">% of the elements width or length</p> </td> </tr> </tbody></table> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="4" type="1"><li class="MsoNormal" style="text-align: justify;">Border attribute</li></ol> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <table class="MsoTableGrid" style="margin-left: 59.4pt; border-collapse: collapse; border: medium none;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="width: 162pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Attributes<o:p></o:p></b></p> </td> <td style="width: 207pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Values<o:p></o:p></b></p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Border-style</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Solid, double, ridge, inset, outset</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Border-color</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Color name or color code</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Border-width</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Thin, medium</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Border-top</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Specifies width, color, style</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Border</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Sets all properties at once</p> </td> </tr> </tbody></table> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="5" type="1"><li class="MsoNormal" style="text-align: justify;">Margin attribute</li></ol> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <table class="MsoTableGrid" style="margin-left: 59.4pt; border-collapse: collapse; border: medium none;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="width: 162pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Attributes<o:p></o:p></b></p> </td> <td style="width: 207pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Values<o:p></o:p></b></p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Margin-top</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Percent. Length, auto</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Margin-left</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Percent. Length, auto</p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">Margin</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Percent. Length, auto</p> </td> </tr> </tbody></table> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <ol style="margin-top: 0cm;" start="6" type="1"><li class="MsoNormal" style="text-align: justify;">List attribute</li></ol> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <table class="MsoTableGrid" style="margin-left: 59.4pt; border-collapse: collapse; border: medium none;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="width: 162pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Attributes<o:p></o:p></b></p> </td> <td style="width: 207pt; border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;"><b style="">Values<o:p></o:p></b></p> </td> </tr> <tr style=""> <td style="width: 162pt; border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0cm 5.4pt;" width="216" valign="top"> <p class="MsoNormal" style="text-align: justify;">List-style</p> </td> <td style="width: 207pt; border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0cm 5.4pt;" width="276" valign="top"> <p class="MsoNormal" style="text-align: justify;">Disc, circle, decimal, lower-roman, lower-alpha, Lower-roman, none</p> </td> </tr> </tbody></table> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 3) Inline Style Sheets <o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span></b>Document style can vary. One of these is the inline style. In inline styles an individual elements style is declared using the STYLE attribute. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><p style = “font-size:20pt”>We can write some text here<p/></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">The style attribute specifies a style for the element. Each CSS property is followed by a colon, then the value of the attribute. In the above HTML line, the text will have 20 point text size. </p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Inline style overrides any other style method applied. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 4) Embedding Style Sheets <o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>We can embed Style Sheets by linking. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <pre><span style="font-size: 12pt; font-family: "Times New Roman";"><link type="text/css" rel="stylesheet" href="style.css"><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p> </o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";">Style information can be associated with the web page in several ways:<o:p></o:p></span></pre><pre style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 12pt; font-family: Symbol;"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="font-size: 12pt; font-family: "Times New Roman";">By embedding the style information directly through a STYLE attribute<o:p></o:p></span></pre><pre style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 12pt; font-family: Symbol;"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="font-size: 12pt; font-family: "Times New Roman";"><H1 STYLE=text-align <b style="">:</b>center>Inline Style Sheet <H1><o:p></o:p></span></pre><pre style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 12pt; font-family: Symbol;"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span>By embedding the style information directly through a <STYLE> header<o:p></o:p></span></pre><pre style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 12pt; font-family: Symbol;"><span style="">·<span style="font: 7pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="font-size: 12pt; font-family: "Times New Roman";">By embedding the style information directly through <LINK> element<o:p></o:p></span></pre><pre style="margin-left: 18pt;"><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p> </o:p></span></pre> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 5) External Style Sheets</b></p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">By externally linking we can give a common look to our web site. Modifying a single Style Sheet file can change the style of the whole web site. The linking tag is given in the <head> tag of the HTML document. </p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><link type="text/css" rel="stylesheet" href="style.css"></p> <pre><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p> </o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";">An example to link the Style Sheets in HTML document is <o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p> </o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><HEAD><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><LINK type="text/css" rel="stylesheet" href="style.css"><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"></HEAD><o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><o:p> </o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";">where the LINK element specifies the relationship between the current document and another document using the REL attribute. The TYPE attribute specifies the MIME type as text/css and provide the URL for the stylesheet with the HREF attribute. <o:p></o:p></span></pre><pre><span style="font-size: 12pt; font-family: "Times New Roman";"><span style=""> </span>style.css is the external Style Sheet containing the style elements. <o:p></o:p></span></pre> <p class="MsoNormal" style="text-align: justify;"><b style=""><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">6) <u>Summary<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><o:p><span style="text-decoration: none;"> </span></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span>In this lecture we have learnt using the <STYLE> tag. Creating different colored attributes and linking them to the HTML document was done in this lecture. </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">7) <u>Exercise questions</u><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">1)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Where is the <STYLE> tag placed in the HTML document?</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">2)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->What are inline Style Sheets?</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">3)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->What does type relate to in the link tag?</p> <p class="MsoNormal" style="margin-left: 18pt; text-align: justify;"><o:p> </o:p></p> <h1>8) <u>Programming / Computational assignments<o:p></o:p></u></h1> <p class="MsoNormal" style="text-align: justify;"><b><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 54pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">1)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Design a web page for a questionnaire which consists of 5 questions. In the Style Sheets there should be 2 statements-one for the questions and the other for the answers. </p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 18pt;">The style for the question is :</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;">Font-size=14, bold, italic, font-color=black. </p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 18pt;">And the style for the answers is :</p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify; text-indent: 36pt;">Font-size=14, font-color=brown. </p> <p class="MsoNormal" style="margin-left: 36pt; text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><u><span style="font-size: 14pt;"><o:p><span style="text-decoration: none;"> </span></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: center;" align="center"><b style=""><u><span style="font-size: 14pt;">Lecture #5<o:p></o:p></span></u></b></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">1) <u>Synopsis</u>:</b> CLASS Attribute, Absolute & relative positioning of elements, DIV and</p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span>SPAN tags</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">2) <u>Target</u>:</b> </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify; text-indent: 21pt;">At the completion of this lecture you should be able to answer questions like:</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(a)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->What is CLASS attribute?</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(b)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Why is positioning required for elements?</p> <p class="MsoNormal" style="margin-left: 45pt; text-align: justify; text-indent: -18pt;"><!--[if !supportLists]--><span style="">(c)<span style="font: 7pt "Times New Roman";"> </span></span><!--[endif]-->Why do we divide the web page into segments?</p> <p class="MsoNormal" style="text-align: justify;"><b style=""><o:p> </o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style="">3) <u>Introduction<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Web pages can be segmented by using the Div tag. This helps us to place elements in a required format. CSS introduce the positioning property which gives us a greater control over how the documents are displayed.<span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><b style="">4) <u>Revision / Prerequisites<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span>Also refer pages 515 to 522 of Web Enabled Commercial Application Development Using…. HTML, DHTML, Java Script , Perl CGI<span style=""> </span>by Ivan Bayross. <span style=""> </span></p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;"><b style="">5. 1) <u>Concepts<o:p></o:p></u></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span><o:p></o:p></b></p> <p class="MsoNormal" style="text-align: justify;"><b style=""><span style=""> </span>CLASS Attribute</b> </p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">Style sheets are exciting as we can give common formats and design by giving very little code. But it can difficult if a few or one paragraph needed to be changed. Sometimes one paragraph need to look different from the others. In such cases, Style Sheets support classes or sets of style changes for a document. A class is defined to change the style in a specific way for any element it is applied to. The style changes can be applied to each HTML tag directly or to a part of a document with the <SPAN></SPAN>tags. The format is </p> <p class="MsoNormal" style="text-align: justify; text-indent: 36pt;">Class = classname</p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">In a Style Sheet, class is defined by a dot followed by the name of the class (i.e classname). </p> <p class="MsoNormal" style="text-align: justify;"><o:p> </o:p></p> <p class="MsoNormal" style="text-align: justify;">Example:</p> <p class="MsoNormal" style="text-align: justify;"><HTML></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><HEAD></p> <p class="MsoNormal" style="text-align: justify;"><span style=""> </span><span style=""> </span><span style=""> </span><TITLE> . . . . .