Introduction to Programming the WWW I CMSC 10100-01 Summer 2003 Lecture 5.

Slides:



Advertisements
Similar presentations
The Web Wizards Guide to HTML Chapter Six Tables.
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Chapter 3 – Web Design Tables & Page Layout
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
Multimedia and the World Wide Web HCI 201 Lecture Notes #5A.
COS 125 Day 25. Agenda  Assignment #7 Due  Final capstone progress report due next class  Assignment #8 Posted Due April 25 One more to go  Exam #5.
CIS101 Introduction to Computing Week 07. Agenda Your questions Resume project Review Project Two HTML Project Three This week online Next class.
© 2004, Robert K. Moniot Chapters 4 & 5 Introduction to HTML, More Details.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Using HTML Tables.
The Power of Tables They aren't just for sitting stuff on anymore...
HTML Code. What we will cover Basic HTML Body Font Images Hyperlinks Tables Frames.
Chapter 6 Working with Frames.
Using Frames in a Web Site
XHTML1 Topics Work with the Frameset Document Type Definition (DTD) Create frames Use the target and base attributes Create nested frames Format frames.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
XHTML1 Tables N100 Creating a Simple Web Page. XHTML2 Creating Basic Tables Tables are collections of rows and columns that you use to organize and display.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
HTML Essentials Frames and Frame Tags. Introduction A frame used to be an effective design tool Utilized space effectively by subdividing screen One idea:
XP Using Frames in a Web Site Ali Alfayly. XP Tutorial Objectives Create frames for a Web site Control the appearance and placement of frames Control.
FRAMES. With frames, we can display more than one HTML document in the same browser window. Each HTML document is called the same browser window. Each.
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
HTML: Tables & Frames Internet Technology1. HTML: Tables Table tags ► surround the entire table ► header row (text is boldfaced) ► surround each row ►
10/4/2015Tables1 Spring, 2008 Modified by Linda Kenney 4/2/08.
The Web Wizard’s Guide to HTML Chapter Seven Frames.
Frame Page A Frame Page does the following: –Defines the size of each frame. –Defines how the window will be broken up – rows or columns. –Specifies which.
Chapter 12 FRAMES. HOW FRAMES WORK When you view a framed page in a browser, you are actually looking at several HTML documents at once. The key to making.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 7: Working with Frames Kelly L.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Department of Information Technology Chapter 9 – Creating Tables Lecturer: Ms Melinda Chung.
Copyright © 2003 Pearson Education, Inc. Slide 4-1 Created by, Stephanie Ludi, Rochester Institute of Technology—NY Basic Web Page Construction Tables,
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 5.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 6.
HTML Concepts and Techniques Fifth Edition Chapter 6 Using Frames in a Web Site.
Jozef Goetz, © 2011 Pearson Education Copyright (c) 2007Prentice-Hall. All rights reserved.
The Web Wizard’s Guide to HTML Chapter Seven Frames.
Week 5 Working with Tables. 2 Understanding Table Basics.
Lesson 7. Tables Table Tags and Attributes Tables HTML tables are used in two main ways: 1.To organize tabular data in a familiar spreadsheet-like way.
Computer Science 101 Lists and Tables. Lists Unordered lists - use a bullet Ordered lists - use a number, Roman numeral, or letter.
CS-3432 Electronic Commerce Lecture – 7 Sikandar Shujah Toor
1 HTML Frames
Chapter 5 Working with Tables Principles of Web Design, 4 th Edition.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
Week 9: HTML Tables and Frames HNDIT11062 – Web Development.
Introduction to Programming the WWW I CMSC Winter 2004 Lecture 5.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
HTML Frames. Advantages to Using Frames n flexibility in design n information in different Web pages n remove redundancy. n site easier to manage. n update.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
LINKING WEBPAGES USING HTML HYPERLINKS. Hyperlinks are text strings or images on a webpage which when clicked on, links to another section in the same.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 5.
Jozef Goetz, © 2011 Pearson Education Copyright (c) 2007Prentice-Hall. All rights reserved.
Chapter 4 Frames and Cascading Style Sheets. Frames Frames divide a browser window into two or more separate pieces or panes, with each pane containing.
XHTML Introductory1 Frames Chapter 5. XHTML Introductory2 Objectives In this chapter, you will: Work with the Frameset Document Type Definition (DTD)
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 4.
HTML Comprehensive Concepts and Techniques Second Edition Creating Frames on a Web Page.
Introduction to HTML.
Working with Tables: Module A: Table Basics
Tables and Frames.
HTML Tables CS 1150 Spring 2017.
Chapter 5 Introduction to XHTML: Part 2
HTML Tables & Frames Internet Technology.
Lesson 5: HTML Tables.
HTML Tables & Frames Internet Technology.
Presentation transcript:

Introduction to Programming the WWW I CMSC Summer 2003 Lecture 5

2 Topics Today Table (cont’d) Frames  frameset  frame  nested framesets  targeting links to frames  navigation via frames  deep linking  pros and cons of frames Case study  To dissect a complicated Web page

3 Reminder Homework1 due midnight today Register at course’s web if you have not done it  I need your cs account information No class on July 4 th (this Friday)

4 Elements Used in Table Table element  Table row element  Table data element  Table head element 

5 Table Structure Sample Table headrow-col1 … headrow-coln row1-col1 … row1-coln … rowm-col1 … rowm-coln sampletable.html

6 Table Element Attributes align  values: left, center, right  default: left bgcolor, background border  values: n (an integer)  default: 0

7 Table Element Attributes (cont’d) cellpadding  margin between cell content and cell border  default: 2 cellspacing  space between adjacent cells  default: 2 Example: table_layout.htmltable_layout.html

8 Table Cells A table cell = a table data element Tables cells can be independent from each other  background colors: bkcolor  background patterns: background  alignments: align  fonts: using nested Use case: a table with a single cell can frame an image or offset important text  Example: singlecell-image.htmlsinglecell-image.html

9 Tables and Text Text is hard to read against a busy background pattern, but you can lay a table containing text on top of a background pattern without sacrificing readability (just give the table a solid background color)  Examples: table_text2.html vs. table_text1.htmltable_text2.htmltable_text1.html Tables can also be used to separate text into two columns (a cellpadding=“20” table attribute will put white space between the two columns)  Example: table_2col.htmltable_2col.html More on tables for page layout later

10 colspan and rowspan colspan and rowspan are table data attributes that are used to create irregular tables A table cell can be extended horizontally with the colspan attribute A table cell can be extended vertically with the rowspan attribute Example:  table_rowspan.html table_rowspan.html  table_colspan.html table_colspan.html  composite example (with both rowspan and colspan) composite example

11 Tables and Graphics Tables can be used to control a Web page layout for multiple images (or images mixed with text) Images of different sizes can be fit together in irregularly-shaped tables using cell-structure diagrams All tables have an underlying cell structure with a uniform number of table cells across each table row

12 Rules for Table Element TD Rule 1: each row receives a TD element whenever the row has (1) a cell with no arrow or (2) a cell with the beginning of an arrow TD Rule 2: any TD tag corresponding to a cell that contains the beginning of a downward-pointing arrow receives a ROWSPAN attribute with a value equal to the length of the arrow TD Rule 3: any TD tag corresponding to a cell that contains the beginning of a rightward-pointing arrow receives a COLSPAN attribute with a value equal to the length of the arrow

13 Web Page Borders Empty table columns can be used to create margins for text on a Web page Use a fixed width attribute (e.g. width=“50” ) for the empty table data element Put an internal table inside Better to control margins with CSS (later)

14 One vs. Many If you have one very large table, try to break it up into a sequence of smaller tables that can be stacked vertically on a Web page Browsers download the contents of an entire table before any of the table can be viewed Multiple tables will be displayed incrementally so the user will be able to see the first part of your page while the rest of the page is still downloading

15 Disadvantages of tables for layout Not all browsers can read tables Complex layout requires complex tables (lots of headaches, room for error) Complex tables can download, be rendered slowly Scalability issues

16 Frames Frames can be used to facilitate Web site navigation  Good for organizing large Web sites Easy to construct However, frame-based approaches have disadvantages

17 Frame Code Structure … use no-frame version instead

18 The Frameset Element The frameset tag pair should follow the head element, replacing the body element The cols and rows attributes are used to divide the Web page into frames Each frame is represented by a separate frame element Specify DOCTYPE as “HTML 4.01 Frameset”  HTML 4.01 Frameset is a variant of HTML 4.01 Transitional for documents that use frames.

19 Setting up rows and columns Specify a certain number of rows or columns of certain sizes by This makes a three columns of 100 pixels, 300 pixels, and the rest of the screen Example: frameseta.htmlframeseta.html Can also use percentages (n%) Use no more than one * in the list

20 The Frame Element Each frame tag should contain a name attribute The name attribute is used for targeting links (see later) Each frame tag should contain a src attribute that specifies a Web page Can turn off scroll bars with scrolling=“no” frame is a self-closing tag  Other self-closing tags?

21 Some more attributes You may specify frameborder, framespacing, and border attributes Only border seems to have a big effect HTML validator has trouble with frameborder See HTML p. 136, and W3C online for more information Examples:  frameseta1.html (border="5" framespacing="5“) frameseta1.html  frameseta2.html (frameborder="0" border="0" framespacing="0“) frameseta2.html

22 Tabular layout By setting both the cols and rows attribute, you create a table of frames Frames are listed row by row Example: framesetb.htmlframesetb.html

23 Nested framesets Irregular layouts are useful (the equivalent of using rowspan or colspan in a table layout) You can specify a instead of a to create nested framesets Or, you can set the src for a frame to point to a frameset file. Example: framesetc.htmlframesetc.html

24 Linking in frames Target links to correct frame Avoid sucking in external sites

25 The target attribute In a frameset, you can specify which frame you want to load a file in  useful when using frames for site navigation loads the source into myframe target=“_top” clears the frameset target=“popup” loads in a new window Example: framesetd1.htmlframesetd1.html

26 The base tag Rather than specifying the target for each link, you can add a line before the such as Sets default link Can also set default link targets to be “_top” to leave the site

27 Deep Linking A deep link is any absolute link inside a framed Web page that displays the destination page inside the frame system You can avoid deep links by sending them to a new browser window Any link can be routed to a new browser window with the target attribute

28 Frames for Site Navigation A typical frame layout uses two nested frameset elements to divide a Web page into three frames: 1.The title frame runs across the top of the Web page 2.A navigational frame occupies a left-hand border under the title frame 3.A content frame occupies the remainder of the Web page Example: framesetd.htmlframesetd.html

29 Art Galleries with Frames A three-frame layout works well for an online art gallery Fill the navigation frame with clickable thumbnail previews When a user clicks on a thumbnail preview, send the original image to the content frame Example: framesete.htmlframesete.html

30 Problems with Frames Not all browsers support frames (try it on a palm!) It is difficult for others to link to content inside a frame It’s easy to create deep links by accident Tougher to save sub-pages, messy with browser cache Complex layout awkward Doesn’t control layout inside each frame

31 Advantages of Frames Frames support intuitive site layouts that are easy to navigate Site development efforts can focus on content and navigation as independent problems Scalability: write one navigation tool bar and stick it in a frame - only change one file to change navigation system

32 Frames vs. tables Tables are tougher to code (but this is fixable through scripting) Tables have wider (but not universal) support on browsers Frames are really quick to get going

33 Case Study What will we study?  Modified version of course’s syllabus page  URL: rchive/2003/summer/ /syllabus_bak.html rchive/2003/summer/ /syllabus_bak.html Why will we study this page?

34 The Anatomy of Syllabus page How to analyze?