 2008 Pearson Education, Inc. All rights reserved. 1 2 2 Introduction to XHTML.

Slides:



Advertisements
Similar presentations
Introduction to HTML Part 2
Advertisements

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?
Images, Tables, lists, blocks, layout, forms, iframes
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
 2004 Prentice Hall, Inc. All rights reserved. Introduction to XHTML: Part 1.
 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.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
Creating Web Page Forms
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
225 City Avenue, Suite 106 Bala Cynwyd, PA , phone , fax presents… HTML Lists, Tables and Forms v2.0.
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.
HTML Hyper Text Markup Language It is used for describing web documents or web pages. A markup language is set of markup tags. HTML documents are described.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 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.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
2.2 XHTML (cont.). Motto Yea, from the table of my memory I’ll wipe away all trivial fond records. —William Shakespeare.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
Internet & World Wide Web How to Program, 5/e. Revised by Dr. T. Tran for CSI3140 Copyright © Pearson, Inc All Rights Reserved.2.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
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.
Copyright © Pearson, Inc All Rights Reserved. WEEK 7: INTRODUCTION TO HTML5 Sotiris Charalambous.
1 Chapter 2 - Introduction to HTML: Part 2 Outline Basic HTML Tables Intermediate HTML Tables and FormattingBasic HTML Forms More Complex HTML Forms Internal.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Introduction to XHTML/HTML5 (part 2) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web How To Program (multiple versions) 1.
HTML AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
XHTML Dr. Reda Salama. Reading 2.
XHTML Dr. Reda Salama. Reading 2.
Lecture 16. A Very Brief Introduction to HTML and XHTML, part V Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to HTML5.
Introduction to XHTML/HTML5 (part 2)
4 Introduction to XHTML.
Working with Tables: Module A: Table Basics
4 Introduction to XHTML.
4 Introduction to XHTML.
Elements of HTML Web Design – Sec 3-2
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
Elements of HTML Web Design – Sec 3-2
Chapter 4 - Introduction to XHTML: Part 1
Chapter 5 - Introduction to XHTML: Part 2
4 Introduction to XHTML.
1 Introduction to XHTML.
Introduction to HTML- Basics
Introduction to XHTML Cont:.
Introduction to HTML.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Presentation transcript:

 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML

 2008 Pearson Education, Inc. All rights reserved. 2 OBJECTIVES In this chapter you will learn:  To understand important components of XHTML documents.  To use XHTML to create web pages.  To add images to web pages.  To create and use hyperlinks to navigate web pages.  To mark up lists of information.  To create tables with rows and columns of data and control table formatting.  To create and use forms to get user input.  To make web pages accessible to search engines using tags.

 2008 Pearson Education, Inc. All rights reserved Introduction 4.2Editing XHTML 4.3First XHTML Example 4.4 W3C XHTML Validation Service 4.5 Headings 4.6 Linking 4.7 Images 4.8 Special Characters and Horizontal Rules 4.9 Lists 4.10 Tables 4.11 Forms 4.12 Internal Linking 4.13 meta Elements 4.14 Wrap-Up 4.15 Web Resources

 2008 Pearson Education, Inc. All rights reserved Lists Unordered list element ul – creates a list in which each item in the list begins with a bullet symbol (called a disc) – Each entry is an li (list item) element. Most web browsers render these elements with a line break and a bullet symbol at the beginning of the line

 2008 Pearson Education, Inc. All rights reserved. 5 Creates an unordered list Makes hyperlinked elements into individual list items Fig. 4.8 | Unordered list containing hyperlinks (Part 1 of 2).

 2008 Pearson Education, Inc. All rights reserved. 6 Fig. 4.8 | Unordered list containing hyperlinks (Part 2 of 2).

 2008 Pearson Education, Inc. All rights reserved Lists (Cont.) The ordered list element ol creates a list in which each item begins with a number Lists may be nested to represent hierarchical data relationships

 2008 Pearson Education, Inc. All rights reserved. 8 Fig. 4.9 | Nested and ordered lists (Part 1 of 3). A single list element

 2008 Pearson Education, Inc. All rights reserved. 9 Fig. 4.9 | Nested and ordered lists (Part 2 of 3). Creates an ordered list within a list element Another single unordered list element Creates an ordered list within this list element Ends the list element Ends nested list

 2008 Pearson Education, Inc. All rights reserved. 10 Fig. 4.9 | Nested and ordered lists (Part 3 of 3).

 2008 Pearson Education, Inc. All rights reserved Tables table element – defines an XHTML table – Attribute summary summarizes the table’s contents and is used by speech devices to make the table more accessible to users with visual impairments – Element caption describes the table’s content The text inside the tag is rendered above the table in most browsers

 2008 Pearson Education, Inc. All rights reserved Tables (Cont.) A table can be split into three distinct sections: – Head ( thead element) Table titles Column headers – Body ( tbody element) Primary table data – Foot ( tfoot element) Calculation results Footnotes Above body section in the code, but displays at the bottom in the page

 2008 Pearson Education, Inc. All rights reserved Tables (Cont.) Element tr – Defines individual table rows – Element th Defines a header cell – Element td Contains table data elements

 2008 Pearson Education, Inc. All rights reserved | Creating a basic table (Part 1 of 3). Begins a new XHTML table Sets the table’s border to be one pixel wide Sets the table’s width to 40% of the screen Describes the table’s contents in the summary attribute Sets the text above the table Creates a head element Creates a table heading cell in the new table row Makes a new table row Creates the next cell in the row

 2008 Pearson Education, Inc. All rights reserved | Creating a basic table (Part 2 of 3). Creates a foot section Creates table header cells at the bottom of the table Creates a body section Inserts a cell in the body of the table Ends the table

 2008 Pearson Education, Inc. All rights reserved | Creating a basic table (Part 3 of 3).

 2008 Pearson Education, Inc. All rights reserved Tables (Cont.) You can merge data cells with the rowspan and colspan attributes – The values of these attributes specify the number of rows or columns occupied by the cell – Can be placed inside any data cell or table header cell

 2008 Pearson Education, Inc. All rights reserved | Complex XHTML table (Part 1 of 3). Makes the header cell span 2 rows

 2008 Pearson Education, Inc. All rights reserved | Complex XHTML table (Part 2 of 3). Makes the header cell span 4 columns

 2008 Pearson Education, Inc. All rights reserved | Complex XHTML table (Part 3 of 3).

 2008 Pearson Education, Inc. All rights reserved Forms XHTML provides forms for collecting information from users Forms contain visual components, such as buttons, that users interact with Forms may also contain nonvisual components, called hidden inputs, which are used to store any data that needs to be sent to the server, but is not entered by the user

 2008 Pearson Education, Inc. All rights reserved Forms (Cont.) A form begins with the form element – Attribute method specifies how the form’s data is sent to the web server – The action attribute of the form element specifies the script to which the form data will be sent

 2008 Pearson Education, Inc. All rights reserved Forms (Cont.) The input element provides data to the script that processes the form – The text input inserts a text box into the form, which allows the user to input data – The label element provides users with information about the input element’s purpose – The size attribute specifies the number of characters visible in the input element – Optional attribute maxlength limits the number of characters input into a text box – The submit input submits the data entered in the form to the web server for processing Most web browsers create a button that submits the form data when clicked – The reset input allows a user to reset all form elements to their default values

 2008 Pearson Education, Inc. All rights reserved. 24 Fig | Form with hidden fields and a text box (Part 1 of 2). Appends form data to the browser request No URL is used to process this form’s data Creates hidden inputs not visible to the user

 2008 Pearson Education, Inc. All rights reserved. 25 Fig | Form with hidden fields and a text box (Part 2 of 2). Creates a label for the text field Inserts a text box called “name” with 25 characters visible and a 30 character limit Inserts a submit button with “Submit” written on it Inserts a reset button with “Clear” written on it Ends the XHTML form

 2008 Pearson Education, Inc. All rights reserved Forms (Cont.) The textarea element inserts a multiline text box, called a text area, into a form – The number of rows in the text area is specified with the rows attribute – The number of columns (i.e., characters per line) is specified with the cols attribute The password input inserts a password box into a form – Allows users to enter sensitive information, such as credit card numbers and passwords, by “masking” the information input with another character, usually asterisks – The actual value input is sent to the web server, not the asterisks that mask the input

 2008 Pearson Education, Inc. All rights reserved Forms (Cont.) The checkbox input allows the user to make a selection – When the checkbox is selected, a check mark appears in the checkbox. Otherwise, the checkbox is empty – Checkboxes can be used individually and in groups. Checkboxes that are part of the same group have the same name A radio button is similar in function and use to a checkbox, except that only one radio button in a group can be selected at any time – All radio buttons in a group have the same name attribute but different value attributes. The select input provides a drop-down list of items – The name attribute identifies the drop-down list – The option element adds items to the drop-down list

 2008 Pearson Education, Inc. All rights reserved Forms (Cont.) The br element causes most browsers to render a line break Any markup or text following a br element is rendered on the next line

 2008 Pearson Education, Inc. All rights reserved. 29 Fig | Form using a variety of components (Part 1 of 5).

 2008 Pearson Education, Inc. All rights reserved. 30 Fig | Form using a variety of components (Part 2 of 5). Inserts a text area with 4 rows and 36 columns, whose initial text is “Enter comments here.” Inserts an input field that displays entered text as asterisks (or another character) Inserts several checkboxes with different labels

 2008 Pearson Education, Inc. All rights reserved. 31 Fig | Form using a variety of components (Part 3 of 5). Inserts a group of radio buttons, only one of which can be selected Initially sets this radio button as selected

 2008 Pearson Education, Inc. All rights reserved. 32 Fig | Form using a variety of components (Part 4 of 5). Create a drop-down list named “rating” Sets “Amazing” as the initially selected option

 2008 Pearson Education, Inc. All rights reserved. 33 Fig | Form using a variety of components (Part 5 of 5).

 2008 Pearson Education, Inc. All rights reserved Internal Linking The a tag can be used to link to another section of the same document by specifying the element’s id as the link’s href. To link internally to an element with its id attribute set, use the syntax #id.

 2008 Pearson Education, Inc. All rights reserved. 35 Fig | Internal hyperlinks to make pages more navigable (Part 1 of 3). Sets the id attribute for the h1 element Creates a link to the element in this document with id = bugs

 2008 Pearson Education, Inc. All rights reserved. 36 Fig | Internal hyperlinks to make pages more navigable (Part 2 of 3). Creates a link to the element in this document with id = features Sets the id attribute for this h1 element

 2008 Pearson Education, Inc. All rights reserved. 37 Fig | Internal hyperlinks to make pages more navigable (Part 3 of 3).

 2008 Pearson Education, Inc. All rights reserved meta Elements One way that search engines catalog pages is by reading the meta element’s contents. – The name attribute identifies the type of meta element – The content attribute Of a keywords meta element: provides search engines with a list of words that describe a page, which are compared with words in search requests Of a description meta element: provides a three- to four-line description of a site in sentence form, used by search engines to catalog your site. This text is sometimes displayed as part of the search result

 2008 Pearson Education, Inc. All rights reserved. 39 Fig | meta elements provide keywords and a description of a page (Part 1 of 2). Provides keywords describing the page for a search engine Provides the site’s description in sentence form for a search engine

 2008 Pearson Education, Inc. All rights reserved. 40 Fig | meta elements provide keywords and a description of a page (Part 2 of 2).