 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.

Slides:



Advertisements
Similar presentations
Common Tags Always include the … tags Comments placed inside tags HTML documents –HEAD section Info about the document Info in header not generally rendered.
Advertisements

Tables Tables provide a means of organising the layout of data
Chapter 3 – Web Design Tables & Page Layout
Introduction to HTML Part 2
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Frames.
Session 3 Intermediate HTML Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 Table1.html 1 2
1 Outline 9.1Introduction 9.2Markup Languages 9.3Editing HTML 9.4Common Tags 9.5Headers 9.6Text Styling 9.7Linking 9.8Images 9.9Formatting Text With 9.10Special.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Outline 9.1Introduction 9.2Markup Languages 9.3Editing HTML 9.4Common Tags 9.5Headers 9.6Text Styling.
17/10/11. 2  The form element ( ) is used to include a number of form elements together so that they can be referenced by some other code in order to.
1 Introduction to XHTML: Part 2 Outline Introduction Basic XHTML Tables Intermediate XHTML Tables and Formatting Basic XHTML Forms More Complex XHTML Forms.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Page 1 of 58 HTML Vadim Parizher Computer Science Department California State University, Northridge Slides from text Book by Deitel, Deitel & Nieto These.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Chapter 10 – Intermediate HTML 4 Outline 10.1Introduction 10.2Unordered Lists 10.3Nested and Ordered.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
1 XHTML Tables A table is a matrix of cells, for displaying content in rows and columns The cells can include almost any element Some cells display row.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 Outline 3.1 Introduction 3.2 Editing HTML 3.3 First HTML Example 3.4 W3C HTML Validation Service 3.5 Headers 3.6 Linking 3.7 Images 3.8 Special Characters.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 HTML Basics Dr. Awad Khalil Computer Science Department AUC.
© 2004, Robert K. Moniot Chapter 5 Introduction to HTML, Continued.
1 XHTML Forms A form is the mechanism to –Collect information from a browser user –Transmit collected information from a browser to a server HTML/XHTML.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
Web Development University of Khartoum. Web Development Web Programming Web Design University of Khartoum.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
Chapter 5: XHTML, Part 2 CIS 275—Web Application Development for Business I.
1 HTML Advanced Features Dr. Awad Khalil Computer Science Department AUC.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 Introduction to HTML: Part 1 Outline Introduction Elements and Attributes Editing HTML Common Elements Headers Images Unordered Lists Nested and Ordered.
1 Web Development Lecture # 11 Introduction to XHTML (Chapter # 4) It.GulGasht.Com.
Chapter 10 – Intermediate HTML 4 Outline 10.1Introduction 10.2Unordered Lists 10.3Nested and Ordered Lists 10.4Basic HTML Tables 10.5Intermediate HTML.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
1 Introduction to XHTML. 2 Main.html Program Output 1 2
 2004 Prentice Hall, Inc. All rights reserved. Introduction to XHTML: Part 2 Outline frameset Element 5.10 Nested frameset s.
1 Week Four– Advance HTML 2 Dr. Fadi Safieddine. 2 Lecture Content Basic HTML Tables Using based Feedback form Creating and Using Image Maps Nested.
Presentation 5: Advanced XHTML Tables, Forms, Image Maps, Meta data and Frames Fundamentals of Web-Centric Development.
1 Introduction to XHTML: Part 1 Outline Introduction Elements and Attributes Editing XHTML Common Elements W3C XHTML Validation Service Headers Linking.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to XHTML 1 Chapter 4 Introduction to XHTML: Part 1 Reference From: Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Adapted from  2012 Prentice Hall, Inc. All rights reserved. 5 th ed: th ed: SY306 Web and Databases for Cyber Operations Set 2:
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
CS3101 Internet Programming. Chapter 01 Introduction to XHTML 2Internet Programming - Chapter 01:XHTML Slides based on: Programming the World Wide Web.
INT222 – Internet Fundamentals
1 Chapter 2 - Introduction to HTML: Part 2 Outline Basic HTML Tables Intermediate HTML Tables and FormattingBasic HTML Forms More Complex HTML Forms Internal.
INTERNET APPLICATIONS CPIT405 Forms, Internal links, meta tags, search engine friendly websites.
Introduction to XHTML/HTML5 (part 2) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web How To Program (multiple versions) 1.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to XHTML/HTML5 (part 2)
4 Introduction to XHTML.
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
The Web Warrior Guide to Web Design Technologies
Chapter 5 Introduction to XHTML: Part 2
Chapter 5 - Introduction to XHTML: Part 2
4 Introduction to XHTML.
1 Introduction to XHTML.
Presentation transcript:

 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate XHTML Tables and Formatting 5.4 Basic XHTML Forms 5.5 More Complex XHTML Forms 5.6 Internal Linking 5.7 Creating and Using Image Maps 5.8 Tags 5.9 frameset Element 5.10 Nested framesets 5.11 Internet and World Wide Web Resources

 2001 Prentice Hall, Inc. All rights reserved. Outline 2 Table1.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " A simple XHTML table tag opens a table --> 16 <table border = "1" width = "40%" 17 summary = "This table provides information about 18 the price of fruit"> tag summarizes the table's --> Price of Fruit is the first section of a --> inserts a heading cell. --> Fruit 30 Price The border attribute gives the size in pixels of the table’s border. The width attribute gives the width of the table. The summary attribute describes the table’s contents. Text placed in a table header is rendered bold and centered in the cell.

 2001 Prentice Hall, Inc. All rights reserved. Outline 3 Table1.html inserts a table row. --> Apple 40 $ Orange 45 $ Banana 50 $ Pineapple 55 $ Total 62 $ The body of the table is placed between the tbody tags. Table rows are created using the tr element Data placed between td tags are placed in an individual cell. The table footer belongs at the bottom of the table. It formats text in a similar manner to a table header.

 2001 Prentice Hall, Inc. All rights reserved. Outline 4 Table1.html Program Output Table footer End of table body Start of table body Table header Table Caption

 2001 Prentice Hall, Inc. All rights reserved. Outline 5 Table2.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Internet and WWW How to Program - Tables Table Example Page Here is a more complex sample table and are used to --> The align attribute is used to horizontally align data in a cell. The span attribute indicates width of the data cell in number of columns.

 2001 Prentice Hall, Inc. All rights reserved. Outline <img src = "camel.gif" width = "205" 37 height = "167" alt = "Picture of a camel" /> Camelid comparison 43 Approximate as of 8/ # of Humps 49 Indigenous region 50 Spits? 51 Produces Wool? Camels (bactrian) Africa/Asia 62 Llama 63 Llama 64 Table2.html The vertical alignment of data in a cell can be specified with the valign attribute. The value of the colspan attribute gives the amount of columns taken up by the cell. The value of the rowspan attribute gives the amount of rows taken up by the cell.

 2001 Prentice Hall, Inc. All rights reserved. Outline 7 Table2.html Program Output Llamas Andes Mountains Cell spanning the size of two rows. Cell spanning the size of four columns.

 2001 Prentice Hall, Inc. All rights reserved. Outline 8 Form.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Internet and WWW How to Program - Forms Feedback Form Please fill out this form to help 18 us improve our site <input type = "hidden" name = "recipient" 28 value = /> 29 <input type = "hidden" name = "subject" 30 value = "Feedback Form" /> 31 <input type = "hidden" name = "redirect" 32 value = "main.html" /> 33 Each form must begin and end with form tags. The method attribute specifies how the form’s data is sent to the Web server. The post method appends form data to the browser request. The value of the action attribute specifies the URL of a script on the Web server. Input elements are used to send data to the script that processes the form. A hidden value for the type attribute sends data that is not entered by the user.

 2001 Prentice Hall, Inc. All rights reserved. Outline 9 Form.html inserts a text box --> 36 Name: 37 <input name = "name" type = "text" size = "25" 38 maxlength = "30" /> <input type = "submit" value = 46 "Submit Your Entries" /> 47 <input type = "reset" value = 48 "Clear Your Entries" /> The size attribute gives the number of characters visible in the text box. The maxlength attribute gives the maximum number of characters the user can input. The label element describes the data the user needs to enter in the text box. The value attribute displays a name on the buttons created.

 2001 Prentice Hall, Inc. All rights reserved. Outline 10 Program Output Text box created using input element. Submit button created using input element. Reset button created using input element.

 2001 Prentice Hall, Inc. All rights reserved. Outline 11 Form2.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Internet and WWW How to Program - Forms Feedback Form Please fill out this form to help 18 us improve our site <input type = "hidden" name = "recipient" 24 value = /> 25 <input type = "hidden" name = "subject" 26 value = "Feedback Form" /> 27 <input type = "hidden" name = "redirect" 28 value = "main.html" /> Name:

 2001 Prentice Hall, Inc. All rights reserved. Outline 12 Form2.html 35 creates a multiline textbox --> 36 Comments: Enter your comments here inserts a --> Address: 46 <input name = " " type = "password" 47 size = "25" /> Things you liked: Site design 54 <input name = "thingsliked" type = "checkbox" 55 value = "Design" /> Links 58 <input name = "thingsliked" type = "checkbox" 59 value = "Links" /> Ease of use 62 <input name = "thingsliked" type = "checkbox" 63 value = "Ease" /> Images 66 <input name = "thingsliked" type = "checkbox" 67 value = "Images" /> 68 Setting an input element’s type attribute to checkbox will create a checkbox. Checkboxes that belong to the same group must have same value in the name attribute. The textarea element renders a text area when the page is displayed. The size of the text area can be specified with the rows and cols attribute.

 2001 Prentice Hall, Inc. All rights reserved. Outline 13 Form2.html Program Output 69 Source code 70 <input name = "thingsliked" type = "checkbox" 71 value = "Code" /> Checkbox options created with input element. Text area created with input element.

 2001 Prentice Hall, Inc. All rights reserved. Outline 14 Form3.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Internet and WWW How to Program - Forms Feedback Form Please fill out this form to help 18 us improve our site <input type = "hidden" name = "recipient" 24 value = /> 25 <input type = "hidden" name = "subject" 26 value = "Feedback Form" /> 27 <input type = "hidden" name = "redirect" 28 value = "main.html" /> Name:

 2001 Prentice Hall, Inc. All rights reserved. Outline 15 Form3.html 35 Comments: 36 <textarea name = "comments" rows = "4" 37 cols = "36"> Address: 41 <input name = " " type = "password" 42 size = "25" /> Things you liked: Site design 48 <input name = "things" type = "checkbox" 49 value = "Design" /> Links 52 <input name = "things" type = "checkbox" 53 value = "Links" /> Ease of use 56 <input name = "things" type = "checkbox" 57 value = "Ease" /> Images 60 <input name = "things" type = "checkbox" 61 value = "Images" /> Source code 64 <input name = "things" type = "checkbox" 65 value = "Code" /> 66 67

 2001 Prentice Hall, Inc. All rights reserved. Outline 16 Form3.html 68 creates a radio --> How did you get to our site?: Search engine 76 <input name = "how get to site" type = "radio" 77 value = "search engine" checked = "checked" /> Links from another site 81 <input name = "how get to site" type = "radio" 82 value = "link" /> Deitel.com Web site 85 <input name = "how get to site" type = "radio" 86 value = "deitel.com" /> Reference in a book 89 <input name = "how get to site" type = "radio" 90 value = "book" /> Other 93 <input name = "how get to site" type = "radio" 94 value = "other" /> The checked attribute will mark this radio option by default. An input element with type value equal to radio creates radio buttons.

 2001 Prentice Hall, Inc. All rights reserved. Outline 17 Form3.html Rate our site: tag presents a drop-down --> tags --> Amazing Awful <input type = "submit" value = 124 "Submit Your Entries" /> The selected attribute selects a default value for the drop down list. The select element creates a drop down list. The option tag is used for each option in the drop down list.

 2001 Prentice Hall, Inc. All rights reserved. Outline 18 Program Output Drop down box list created with input element.The Amazing option is selected as a default value. Radio box list created with input element.

 2001 Prentice Hall, Inc. All rights reserved. Outline 19 Program Output

 2001 Prentice Hall, Inc. All rights reserved. 20 Internal Linking Internal linking –Assign location name to individual point in an HTML file –Location name can then be added to the page’s URL Link to specific point on the page –Location marked by including a NAME attribute in an A (anchor) element Ex. in list.html –URL of location Format: page.html#name Ex. list.html#features

 2001 Prentice Hall, Inc. All rights reserved. Outline 21 Links.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Internet and WWW How to Program - List creates an internal hyperlink --> The Best Features of the Internet Go to Favorite CEOs You can meet people from countries 24 around the world You have access to new media as it becomes public: New games 29 New applications For Business 32 For Pleasure To internally link, place a # sign in front of the name of the desired anchor element within the page.

 2001 Prentice Hall, Inc. All rights reserved. Outline 22 Links.html 36 Around the clock news 37 Search Engines 38 Shopping 39 Programming XHTML 42 Java 43 Dynamic HTML 44 Scripts 45 New languages Links 52 Keeping in touch with old friends 53 It is the technology of the future! My 3 Favorite CEOs Go to Favorite Features An anchor named ceos will be created at this point on the page. This anchor does not link and will not be seen on the page. However, other anchors can refer to this anchor and link to it.

 2001 Prentice Hall, Inc. All rights reserved. Outline 23 Links.html Program Output Bill Gates 68 Steve Jobs 69 Michael Dell Clicking on this internal link will bring the user to the bottom of the page where My 3 Favorite CEOs is located.

 2001 Prentice Hall, Inc. All rights reserved. 24 Creating and Using Image Maps Image maps –Designate certain sections of an image as hotspots –Use hotspots as anchors for linking –All elements of image map inside … tags – tag requires NAME attribute Ex. Hotspots designated with AREA element –AREA attributes: HREF sets the target for the link on that spot SHAPE and COORDS set the characteristics of the AREA ALT provides alternate textual description

 2001 Prentice Hall, Inc. All rights reserved. 25 Creating and Using Image Maps (II) AREA element (continued) –SHAPE = “rect” Causes rectangular hotspot to be drawn around the coordinates given in the COORDS attribute COORDS - pairs of numbers corresponding to the x and y axes –x axis extends horizontally from upper-left corner –y axis extends vertically from upper-left corner Ex. –Rectangular hotspot with upper-left corner of rectangle at (3, 122) and lower-right corner at (73, 143)

 2001 Prentice Hall, Inc. All rights reserved. 26 Creating and Using Image Maps (III) AREA element (continued) –SHAPE = “poly” Causes a hotspot to be created around specified coordinates Ex. –SHAPE = “circle” Creates a circular hotspot Coordinates of center of circle and radius of circle, in pixels Ex.

 2001 Prentice Hall, Inc. All rights reserved. 27 Creating and Using Image Maps (IV) To use the image map with an IMG element –Insert the USEMAP = “#name” attribute into the IMG element –name - value of the NAME attribute in the MAP element –Ex.

 2001 Prentice Hall, Inc. All rights reserved. Outline 28 Picture.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " Internet and WWW How to Program - Image Map tag defines an image map --> <area href = "form.html" shape = "rect" 26 coords = "2,123,54,143" 27 alt = "Go to the feedback form" /> 28 <area href = "contact.html" shape = "rect" 29 coords = "126,122,198,143" 30 alt = "Go to the contact page" /> 31 <area href = "main.html" shape = "rect" 32 coords = "3,7,61,25" alt = "Go to the homepage" /> 33 <area href = "links.html" shape = "rect" 34 coords = "168,5,197,25" 35 alt = "Go to the links page" /> The area element is used to create hotspots. The shape attribute defines a shape for the hotspot. The first two integers of the coordinate attribute define the (x,y) coordinate of the upper-left hand corner of the rectangle. The last two integers define the (x,y) coordinate of the lower-right hand corner of the rectangle.

 2001 Prentice Hall, Inc. All rights reserved. Outline 29 Picture.html <area shape = "poly" alt = " the Deitels" 40 coords = "162,25,154,39,158,54,169,51,183,39,161,26" 41 href = /> <area href = 46 shape = "circle" coords = "100,36,33" 47 alt = " the Deitels" /> indicates that the --> <img src = "deitel.gif" width = "200" height = "144" 53 alt = "Deitel logo" usemap = "#picture" /> Assigning poly to the shape attribute creates a polygon with coordinates defined by the coords attribute. Assigning circle to the shape attribute creates a circle, with a center and radius specified by the coords attribute. The image map assigned to the usemap attribute will be used with the image. The # in front of the name of the image map indicates that an internal image map is being used.

 2001 Prentice Hall, Inc. All rights reserved. Outline 30 Program Output Hotspots created using the area element. Selecting the Feedback hotspot links to the page below.

 2001 Prentice Hall, Inc. All rights reserved. 31 Tags Search engines –Catalog sites by following links from page to page –Save identification and classification info –Tells browser that HTML conforms to a Transitional subset of HTML version 4.0 META tag –Main HTML element that interacts with search engines

 2001 Prentice Hall, Inc. All rights reserved. 32 Tags (II) META tags –Contain two attributes that should always be used: –NAME identifies type of META tag –CONTENT provides info the search engine will catalog about your site CONTENT of a META tag with NAME = “keywords” –Provides search engines with a list of words that describe key aspects of your site CONTENT of a META tag with NAME = “description” –Should be 3 to 4 lines –Used by search engines to catalog and display your site META elements –Not visible to users of the site –Should be placed inside header section

 2001 Prentice Hall, Inc. All rights reserved. Outline 33 Main.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 " tag --> Internet and WWW How to Program - Welcome tags give search engines information --> <meta name = "keywords" content = "Webpage, design, 15 XHTML, tutorial, personal, help, index, form, 16 contact, feedback, list, links, frame, deitel" /> <meta name = "description" content = "This Web site will 19 help you learn the basics of XHTML and Webpage design 20 through the use of interactive examples and 21 instruction." /> Welcome to Our Web Site! We have designed this site to teach about the wonders 30 of XHTML. XHTML is 31 better equipped than HTML to represent complex 32 data on the Internet. XHTML takes advantage of 33 XML’s strict syntax to ensure well-formedness. Soon you 34 will know about many of the great new features of 35 XHTML. The meta element provides information to search engines about the document. The name attribute describes the type of meta element. The content attribute provides the information search engines use to catalog pages.

 2001 Prentice Hall, Inc. All rights reserved. Outline 34 Main.html Have Fun With the Site!

 2001 Prentice Hall, Inc. All rights reserved. 35 Tag Frames –Display more than one HTML file at a time –If used properly, frames make your site more readable and usable tag –Uses Frameset instead of Transitional –Tell the browser that you are using frames tags –Tell the browser the page contains frames –Details for frames contained within … tags –COLS or ROWS attribute gives the width or height of each frame In pixels or a percentage

 2001 Prentice Hall, Inc. All rights reserved. 36 Tag (II) FRAME elements –Specify what files will make up frameset –FRAME attributes: NAME - identifies specific frame, enabling hyperlinks to load in their intended frame –TARGET attribute of A element –Ex. –TARGET = “_blank” loads page in a new blank browser window –TARGET = “_self” loads page in the same window as anchor element –TARGET = “_parent” loads page in the parent FRAMESET –TARGET = _top” loads page in the full browser window –SRC Gives the URL of the page that will be displayed in the specified frame

 2001 Prentice Hall, Inc. All rights reserved. 37 Tag (III) Not all browsers support frames –Use the NOFRAMES element inside the FRAMESET –Direct users to a non-framed version –Provide links for downloading a frames-enabled browser Use of frames –Do not use frames if you can accomplish same with tables or other, simpler HTML formatting

 2001 Prentice Hall, Inc. All rights reserved. Outline 38 Index.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 3 " Internet and WWW How to Program - Main 11 <meta name = "keywords" content = "Webpage, design, 12 XHTML, tutorial, personal, help, index, form, 13 contact, feedback, list, links, frame, deitel" /> <meta name = "description" content = "This Web site will 16 help you learn the basics of XHTML and Web page design 17 through the use of interactive examples 18 and instruction." /> tag sets the frame dimensions --> The frameset element informs the browser that the page contains frames. The cols attribute gives the width of each frame. The first vertical frame created is 110 pixels from the left of the browser. The second vertical frame fills the rest of the browser, as indicated by the * value. The frame element loads documents into the frameset. The src attribute indicates the document to be loaded. Nav.html is loaded into the left frame and main.html is loaded into the right frame.

 2001 Prentice Hall, Inc. All rights reserved. Outline 39 Index.html This page uses frames, but your browser does not 32 support them Please, follow this link to 35 browse our site without frames The noframes element provides an option for browsers that do not display frames. Right frame (main) Left frame (leftframe)

 2001 Prentice Hall, Inc. All rights reserved. 40 Nested Tags FRAME element –SCROLLING attribute Set to “no” to prevent scroll bars –NORESIZE attribute prevents user from resizing the frame Nesting frames –Include the correct number of FRAME elements inside FRAMESET –Using nested FRAMESET elements Indent every level of FRAME tag Makes page clearer and easier to debug

 2001 Prentice Hall, Inc. All rights reserved. Outline 41 Program Output When Header Examples is selected, the document it links to is displayed in the right frame.

 2001 Prentice Hall, Inc. All rights reserved. Outline 42 Nav.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3 " Internet and WWW How to Program - Navigation Bar <img src = "buttons/links.jpg" width = "65" 20 height = "50" alt = "Links Page" /> <img src = "buttons/list.jpg" width = "65" 25 height = "50" alt = "List Example Page" /> <img src = "buttons/contact.jpg" width = "65" 30 height = "50" alt = "Contact Page" /> The target attribute specifies where the document linked by the anchor should display. The document will open in the frame called main.

 2001 Prentice Hall, Inc. All rights reserved. Outline 43 Nav.html <img src = "buttons/header.jpg" width = "65" 35 height = "50" alt = "Header Page" /> <img src = "buttons/table.jpg" width = "65" 40 height = "50" alt = "Table Page" /> <img src = "buttons/form.jpg" width = "65" 45 height = "50" alt = "Feedback Form" /> Other values of target can be specified to load documents onto a new browser window, into the same frame that the anchor appears in and onto a full browser window, removing all frames.

 2001 Prentice Hall, Inc. All rights reserved. Outline 44 Index2.html 1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 3 " Internet and WWW How to Program - Main <meta name = "keywords" content = "Webpage, design, 13 XHTML, tutorial, personal, help, index, form, 14 contact, feedback, list, links, frame, deitel" /> <meta name = "description" content = "This Web site will 17 help you learn the basics of XHTML and Web page design 18 through the use of interactive examples 19 and instruction." /> The vertical frame on the right is divided into two horizontal frames. The rows attribute works in a similar manner to the cols attribute, except the rows attribute gives the height of each frame.

 2001 Prentice Hall, Inc. All rights reserved. Outline 45 Index2.html Program Output This page uses frames, but your browser does not 36 support them Please, follow this link to 39 browse our site without frames The nested frame element splits the right vertical frame into two horizontal frames.