Chapter 5. Introduction to XHTML: Part 2

Similar documents
As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

COMP519: Web Programming Lecture 4: HTML (Part 3)

Name Related Elements Type Default Depr. DTD Comment

Structure Bars. Tag Bar

INFS 2150 / 7150 Intro to Web Development / HTML Programming

Web Design and Application Development

Introducing Web Tables

Indian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

Chapter 4. Introduction to XHTML: Part 1

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

IMY 110 Theme 11 HTML Frames

IMY 110 Theme 7 HTML Tables

Creating web pages Chapter 5. Structuring contents

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

Html basics Course Outline

Objectives. Tutorial 8 Designing ga Web Site with Frames. Introducing Frames. Objectives. Disadvantages to Using Frames. Planning Your Frames

Deccansoft Software Services

Index. CSS directive, # (octothorpe), intrapage links, 26

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Chapter 4 Notes. Creating Tables in a Website

Table-Based Web Pages

Creating a Web Page with HTML

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

Summary 4/5. (contains info about the html)

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

IT350 Web and Internet Programming. XHTML Tables and Forms (from Chapter 4 of the text 4 th edition Chapter 2 of the text 5 th edition)

CSC 121 Computers and Scientific Thinking

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

Oliver Pott HTML XML. new reference. Markt+Technik Verlag

THE ASIAN SCHOOL. Class-10. ch8. A. Check the Right Answer (1*9)

Advanced HTML Scripting WebGUI Users Conference

HTML: Fragments, Frames, and Forms. Overview

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

Tables *Note: Nothing in Volcano!*

LESSON LEARNING TARGETS

A Balanced Introduction to Computer Science, 3/E

Chapter 7 Tables and Layout

COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Structuring Documents for the Web 1

c122sep2214.notebook September 22, 2014

Chapter 7 Tables and Layout

Tables & Lists. Organized Data. R. Scott Granneman. Jans Carton

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

NAME: name a section of the page TARGET = "_blank" "_parent" "_self" "_top" window name which window the document should go in

HTML and CSS COURSE SYLLABUS

By Ryan Stevenson. Guidebook #2 HTML

HYPERTEXT MARKUP LANGUAGE ( HTML )

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

framessp2015.notebook February 09, 2015

Web Technology. HTML & xhtml

WTAD Text Editors for HTML. Text Editors: Kate HTML. (HyperText Markup Language)

WTAD. Unit -1 Introduction to HTML (HyperText Markup Language)

HyperText Markup Language/Tables

Certified HTML Designer VS-1027

Which of the following is/are a valid value for the type attribute of the input tag? a. text. b. icon. c. reset. d. password

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

ITNP43: HTML Lecture 3

CITS1231 Midterm Test (A total of 45 marks)

Module: Online Publishing Year: 2 Lecturer: Maxwell Robertson Session: 3 Copyright 2004 (All Rights Reserved.

Web Development & Design Foundations with HTML5

* HTML BASICS * LINKING BY: RIHAM ALSMARI, PNU. Lab 2

1.264 Lecture 12. HTML Introduction to FrontPage

HTML What is HTML Hyper Text Markup Language is a computer based language used to create WebPages.

Tutorial 8: Designing a Web Site with Frames

CITS1231 Web Technologies. HTML Tables and Page Design Issues

Dreamweaver CS3 Concepts and Techniques

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 2 Introduction to XHTML

Certified HTML5 Developer VS-1029

2.1 Origins and Evolution of HTML. 2.3 HTML Document Structure

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Lecture 08. Tables in HTML. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

LESSON 3. Coding Tables Continued

Chapter 4 Creating Tables in a Web Site Using an External Style Sheet

Creating Accessible Web Sites with EPiServer

HTTP and HTML. We will use HTML as a frontend to our webapplications, therefore a basic knowledge of HTML is required, especially in forms.

Table of Contents. MySource Matrix Content Types Manual

Chapter 6. Using Frames in a Web Site

HTML & XHTML Tag Quick Reference

Introduction to Computer Science (I1100) Internet. Chapter 7

2.1 Origins and Evolution of HTML

Internet publishing HTML (XHTML) language. Petr Zámostný room: A-72a phone.:

SAMPLE PAPER I CLASS- X SUBJECT FOUNDATION OF IT. TIME : 3 HRS M.M - 90 NOTE: 1. All questions are compulsory. 2. Write neat and clean.

OVERVIEW. How tables are structured. Table headers. Cell spanning (rows and columns) Table captions. Row and column groups

5/17/2009. Marking Up with HTML. An HTML Web Page File. Tags for Bold, Italic, and underline. Structuring Documents

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Introduction to XHTML: Part 2

USER GUIDE MADCAP FLARE Tables

Table Basics. The structure of an table

HTML Tags <A></A> <A HREF=" CNN </A> HREF

Insert/Edit Image. Overview

How to use the Dealer Car Search ebay posting tool. Overview. Creating your settings

Intro to html. --- define every element, attribute, and entity along with the rules for their use

CSE 3. Marking Up with HTML. Comics Updates Shortcut(s)/Tip(s) of the Day Google Earth/Google Maps ssh Anti-Spyware

Advanced Web Programming C2. Basic Web Technologies

Transcription:

Chapter 5. Introduction to XHTML: Part 2 Tables Attributes of the table element: border: width of the table border in pixels (0 makes all lines invisible) align: horizontal alignment (left, center, or right) width: just as in the hr element (given in pixels or percentage of screen) A caption element is inserted directly above the table. A table has a head: <thead> a body: <tbody> Each contains zero or more tr (table row) elements. Each TR element in the head (resp., body) contains zero or more th (resp., td) elements (i.e., cells). Each of these kinds of elements can have the usual attributes. 26

Example <table border = "1" align = "center" width = "40%"> <caption>example Table</caption> <thead> <tr><th>column 1</th><th>Column 2</th><tr> </thead> <tbody> <tr align = "center"><td>cell 11</td> <td>cell 12</td></tr> <tr><td>cell 21</td> <td align = "center">cell 22</td></tr> </tbody> </table> Example Table Column 1 Column 2 Cell 11 Cell 12 Cell 21 Cell 22 27

The colgroup element (before the thead element) lets us format groups of columns. It contains col elements, each a single tag with attributes affecting an adjacent group of columns. Example: span: the number of columns in the group. <colgroup> <col span = 2 align = left > <col span = 3 align = center > </colgroup> The valign (vertical alignment) attribute (of any element in a table) accepts values top, middle (default), bottom, and baseline. All cells in a row whose valign attribute is baseline have their first text line on a common baseline. For a cell: rowspan: number of rows it occupies (default = 1) colspan: number of columns it occupies (default = 1) Example <td rowspan = 2 colspan = 2 valign = top > </td> 28

Example: <table border = "1" align = "center" width = "100%"> <caption>a Complex Table</caption> <colgroup> <col span = "2" align = "left"> <col span = "3" align = "center"> </colgroup> <thead> <tr><th rowspan = "2" colspan = "2"> *** Head A ***</th> <th colspan = "3">Head B</th></tr> <tr><th>head C1</th> <th>head C2</th> <th>head C3</th></tr> </thead> <tbody> <tr><td>d11</td><td>d12</td><td>c11</td> <td>c12</td><td>c13</td></tr> <tr><td>d21</td><td>d22</td> <td rowspan = "2" colspan = "2" valign = "top">ccc</td> <td>c23</td> </tr> <tr><td>d31</td><td>d32</td><td>c33</td> <tr><td>d41</td><td>d42</td><td>c41</td> <td>c42</td><td>c43</td></tr> </tbody> </table> 29

*** Head A *** A Complex Table Head B Head C1 Head C2 Head C3 D11 D12 C11 C12 C13 D21 D22 CCC C23 D31 D32 C33 D41 D42 C41 C42 C43 30

We ll later come back to Basic XHTML Forms ( 5.4 in the text) More Complex XHTML Forms ( 5.5 in the text) Internal Linking Internal linking lets you assign a location name to a point within an XHTML file. Adding the location name to the page s URL gives an external reference to exactly that point in the page (as opposed to its top). The location name on its own can be used within the page as a reference to that point. To establish an internal hyperlink at a point, place there an element <a name = name ></a> where name becomes the location name for that point. If filename is the name of the page, then the URL of this point is filename.html#name Insert a regular hyperlink within the same page to this point with <a href = #name > </a> Clicking on this hyperlink scrolls the browser window to the given point on the page. 31

Example: <p><a href = "#commontrees"> Go to common trees</a></p> <p><a href = "#commonshrubs"> Go to common shrubs</a></p> <a name = "commontrees"></a> <h2>some Common Trees</h2> <ul> <li>elm</li> <li>oak</li> <li>ash</li> </ul> <a name = "commonshrubs"></a> <h2>some Common Shrubs</h2> <ul> <li>azelea</li> <li>box</li> <li>forsythea</li> </ul> 32

Go to common trees Go to common shrubs Some Common Trees Elm Oak Ash Some Common Shrubs Azelea Box Forsythea 33

Image Maps An image map allows certain image sections to be designated hotspots, used as anchors for linking. Image map elements (the area elements) are inside a map element with required attribute name. To use the image map, use the usemap = #name attribute value assignment in the img element, where name is the value of the name attribute in the map element. A hotspot is designated with the area element, with attributes href: the target for the link shape, coords: the characteristics of the area alt: text to display if the image isn t displayed (as with img) 34

Possible Shapes If shape = rect then coords = x 1,y 1,x 2,y 2 (0,0) (x 1,y 1 ) (x 2,y 2 ) (0,0) If shape = poly then coords = x 1,y 1,x 2,y 2,,x n,y n (x 2,y 2 ) (x 1,y 1 ) (x n,y n ) If shape = circle then coords = x, y, r (0,0) r (x,y) 35

Example: <map name = "picture"> <area href = "f1.html" shape = "rect" coords = "10, 10, 100, 50" alt = "Go to f1"> <area href = "f2.html" shape = "circle" coords = "145, 80, 20" alt = "go to f2"> </map> <img src = "bmex.bmp" width = "300" height = "200" border = "1" alt = map Example" usemap = "#picture"> One area The other area Picture border 36

meta Tags The main HTML element that interacts with search engines is the meta tag (in the header) with attributes name: keywords or description content Example: <head> <meta name = keywords content = Web page, XHTML, examples > <meta name = description content = This Web site contains simple Examples of using XHTML. > <title>a Simple Example of XHTML</title> </head> 37

The frameset Element Frames let you display more than one XHTML file at a time. Use a frameset element instead of a body. The frameset element has two alternative attributes: cols: width of each frame, left to right (with vertical frames) rows: height of each frame, top to bottom (with horizontal frames) The format for the values of these attributes is size 1, size 2,, size n, where Example: size i is in pixels or percentage of the screen, and size n can be *, indicating the rest of the screen. <frameset col = 80, 30%, * > 80 pixels 30% rest 38

The individual frames in a frameset are frame elements (no closing tag) with attributes name: identifies the frame into which a hyperlink is to be loaded src: the URL of the page displayed in the frame The noframes element displays text in browsers not supporting frames. In the file that is loaded into a frame, an anchor <a href = filename target = name > loads the file with name filename into the frame whose name attribute is name. There are predefined values for the target attribute: _blank: load the page into a new browser window (leaving the current window unchanged) _self: load the page into the same frame where the page containing the anchor has been loaded _top: load the page into the full browser (overwriting the frameset) 39

Example: <frameset rows = "80, 30%, *"> <frame name = "f1" src = "f1.html"> <frame name = "f2" src = "f2.html"> <frame name = "f3" src = "f3.html"> <noframes> <p>your browser cannot render frames.</p> </noframes> </frameset> The bodies of f1.html f4.html are, respectively: <p>simple page f1</p> <p>simple page f2</p> <p><a href = "f4.html" target = "f1"> Go to f4</a> </p> <p>simple page f3</p> <p>simple page f4</p> 40

When the page is loaded, we get: After clicking on Go to f4 : 41

Framesets can be nested. Another predefined value for the target attribute on an anchor in a loaded page that makes sense here is _parent: load the page into the parent frameset (enclosing the current frameset). Example: <frameset rows = "80, *"> <frameset cols = "80, *"> <frame name = "f1" src = "f1.html"> <frame name = "f2" src = "f2.html"> </frameset> <frameset cols = "80, *"> <frame name = "f3" src = "f3.html"> <frame name = "f5" src = "f5.html"> </frameset> <noframes> <p> Your browser cannot render frames.</p> </noframes> </frameset> 42

Other frame attributes: scrolling: when no, suppresses scroll bars on the frame noresize (no value): prevents the user from resizing the frame with the mouse. Example: <frame name = f1 scrolling = no noresize src = f1.html > 43