Introduction to HTML Part 2

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML Programming the World Wide Web Fourth edition.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 5-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
4. Internet Programming ENG224 INFORMATION TECHNOLOGY – Part I
Common Tags Always include the … tags Comments placed inside tags HTML documents –HEAD section Info about the document Info in header not generally rendered.
Tables Tables provide a means of organising the layout of data
2002 Prentice Hall, Inc. All rights reserved. Outline 25.1Introduction 25.2Basic HTML Tables 25.3Intermediate HTML Tables and Formatting 25.4Basic HTML.
Svetlin Nakov Telerik Corporation
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?
Creating Tables in a Web Site
Session 3 Intermediate HTML Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 Table1.html 1 2
Chapter 4 – Intermediate HTML 4 Outline 4.1 Unordered Lists 4.2 Nested and Ordered Lists 4.3 Basic HTML Tables 4.4 Intermediate HTML Tables and Formatting.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 4: Tables and Frames.
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.
 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.
CSE 382/ETE 334 Internet and Web Technology Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
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.
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.
Chapter 10 – Intermediate HTML 4 Outline 10.1Introduction 10.2Unordered Lists 10.3Nested and Ordered Lists 10.4Basic HTML Tables 10.5Intermediate HTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
2.2 XHTML (cont.). Motto Yea, from the table of my memory I’ll wipe away all trivial fond records. —William Shakespeare.
1 Introduction to XHTML. 2 Main.html Program Output 1 2
 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.
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.
 2003 Prentice Hall, Inc. All rights reserved. Introduction to HTML: Tables Outline 1 Introduction 2 Basic HTML Tables 3 Intermediate HTML Tables and.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to Web Site Development John Hurley Department of Computer Science California State University, Los Angeles Lecture 4: Favicons Tables and.
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.
Introduction to XHTML/HTML5 (part 2) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web How To Program (multiple versions) 1.
HTML for web designing short course. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension.
HTML Tables Tables are defined with the tag. A table is divided into rows (with the tag), and each row is divided into data cells (with the tag). td stands.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
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.
CS3220 Web and Internet Programming HTML Tables and Forms
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Chapter 5 Introduction to XHTML: Part 2
Chapter 5 - Introduction to XHTML: Part 2
4 Introduction to XHTML.
1 Introduction to XHTML.
Introduction to HTML.
In this session, you will learn to:
Introduction to HTML: Forms
Presentation transcript:

Introduction to HTML Part 2 Outline 4.1 Introduction 4.2 Basic HTML Tables 4.3 Intermediate HTML Tables and Formatting 4.4 Basic HTML Forms 4.5 More Complex HTML Forms 4.6 Internal Linking 4.7 meta Elements 4.8 frameset Element 4.9 Nested framesets 4.10 Web Resources

Objectives To be able to create tables with rows and columns of data. To be able to control table formatting. To be able to create and use forms. To be able to create and use image maps to aid in Web-page navigation. To be able to make Web pages accessible to search engines using meta elements. To be able to use the frameset element to display multiple Web pages in a single browser window.

4.1 Introduction Tables: present information Forms: collect information from visitor Internal linking and image maps: Enhance Web page navigation Frames: display multiple documents in the browser

4.2 Basic HTML Tables Organize data into rows and columns table element:<table></table> Attributes Description border specifies the table’s border width in pixels summary describes the table’s contents Caption (sub element) describes the table’s content and helps text-based browsers interpret table data

Head section (header cell, defined with a thead element) Contains header information such as column names Foot section (defined with a tfoot element) Table body (defined with a tbody element) Data cells (defined with td element) Sub-elements (for thead & tfoot) Description tr individual table row th columns in the head section

Example1: HTML Table: table1.html <table border = "1" width = "40%" summary = "This table provides information about the price of fruit"> <caption><strong>Price of Fruit</strong></caption> <thead> <tr> <th>Fruit</th> <th>Price</th> </tr> </thead> <tfoot> <th>Total</th> <th>$3.75</th> </tfoot>

<tbody> <tr> <td>Apple</td> <td>$0.25</td> </tr> <td>Orange</td> <td>$0.50</td> <td>Banana</td> <td>$1.00</td> <td>Pineapple</td> <td>$2.00</td> </tbody> </table>

4.3 Intermediate HTML Tables &Formatting Element colgroup: groups and formats columns Element col: tr and th attributes: attributes Description align determines the alignment of text in the column span determines how many columns the col element formats attributes Description rowspan,colspan specify the number of rows or columns occupied by a cell valign = top = middle = bottom = baseline aligns data vertically

Example2: Complex HTML table: table2.html <table border = "1"> <colgroup> <col align = "right" span = "1" /> </colgroup> <thead> <tr> <th rowspan = "2"> <img src = "camel.gif" width = "205" height = "167" alt = "Picture of a camel" /> </th> <th colspan = "4" valign = "top"> <h1>Camelid comparison</h1><br /> <p>Approximate as of 9/2002</p> </tr> merge two rows merge four columns

<th># of Humps</th> <th>Indigenous region</th> <tr valign = "bottom"> <th># of Humps</th> <th>Indigenous region</th> <th>Spits?</th> <th>Produces Wool?</th> </tr> </thead> <tbody> <tr> <th>Camels (bactrian)</th> <td>2</td> <td>Africa/Asia</td> <td>Yes</td> <th>Llamas</th> <td>1</td> <td>Andes Mountains</td> </tbody> </table>

4.4 Basic HTML Forms Element form: <form> </form> Sub-element: input <input /> Attributes Description method method = “post” method = “get” specifies how the form’s data is sent to Web server Appends form data to the browser request Appends form data directly to the end of the URL action Specifies the URL of a script on the Web server

Sub-Element input: <input> </input> Attributes Description type type = “hidden” type = “text” type = “submit” type = “reset” Type of form’s input ‘hidden’ input passed to server-side script Textbox with specific size Submit button Reset button name Name passed to server-side script as parameter value ‘Visible’ name on the form

Example3: Form design: form.html <form method = "post" action = "/cgi-bin/formmail"> <p> <input type = "hidden" name = "recipient“ value = "deitel@deitel.com" /> <input type = "hidden" name = "subject" value = "Feedback Form" /> <input type = "hidden" name = "redirect" value = "main.html" /> </p> <p><label>Name: <input name = "name" type = "text" size = "25“ maxlength = "30" /> </label></p> <input type = "submit" value = "Submit Your Entries" /> <input type = "reset" value = "Clear Your Entries" /> </form> Example3: Form design: form.html

4.5 More Complex HTML Forms Sub-Element textarea: <textarea> </textarea> Inserts a multiline text box (text area) Sub-Element input: <input> </input> Attributes Description rows Specifies the number of rows cols Specifies the number columns Attributes Description type type = “password” type = “checkbox” type = “radio” Type of form’s input Password box with specific size Enable users to select from a set of options Radio button

Sub-Element select: <select> </select> Drop down list Contains element option: <option> </option> Sub-Element option: Adds items to the drop-down list Attributes Description selected Specifies which item initially is displayed as the selected item

Example 4: Form with text areas, a password box and checkboxes: form2 Example 4: Form with text areas, a password box and checkboxes: form2.html <form method = "post" action = "/cgi-bin/formmail"> <p><label>Comments:<br /> <textarea name = "comments" rows = "4" cols = "36"> Enter your comments here. </textarea> </label></p> <p><label>E-mail Address: <input name = "email" type = "password" size = "25" />

<strong>Things you liked:</strong><br /> <p> <strong>Things you liked:</strong><br /> <label>Site design <input name = "thingsliked" type = "checkbox" value = "Design" /></label> <label>Links <input name = "thingsliked" type = "checkbox" value = "Links" /></label> <label>Ease of use <input name = "thingsliked" type = "checkbox" value = "Ease" /></label> <label>Images <input name = "thingsliked" type = "checkbox" value = "Images" /></label> <label>Source code <input name = "thingsliked" type = "checkbox" value = "Code" /></label> </p> </form>

Example 5: Form including radio buttons and a drop-down list: form3 Example 5: Form including radio buttons and a drop-down list: form3.html

<label>Search engine <input name = "howtosite" type = "radio" <strong>How did you get to our site?:</strong><br /> <label>Search engine <input name = "howtosite" type = "radio" value = "search engine" checked = "checked" /></label> <label>Links from another site <input name = "howtosite" type = "radio" value = "link" /></label> <label>Deitel.com Web site <input name = "howtosite" type = "radio" value = "deitel.com" /></label> <label>Reference in a book <input name = "howtosite" type = "radio" value = "book" /></label> <label>Other <input name = "howtosite" type = "radio" value = "other" /></label>

<select name = "rating"> <label>Rate our site: <select name = "rating"> <option selected = "selected">Amazing</option> <option>10</option> <option>9</option> <option>8</option> <option>7</option> <option>6</option> <option>5</option> <option>4</option> <option>3</option> <option>2</option> <option>1</option> <option>Awful</option> </select> </label>

4.6  Internal Linking Enables the user to jump between locations in the same document Use anchor attribute: href = #section name

Example 6: Internal hyperlinks: links.html an internal link’s address is ‘#id’ <h1 id = "features">The Best Features of the Internet</h1> <p><a href = "#bugs">Go to <em>Favorite Bugs</em></a></p> <ul> <li>You can meet people from countries around the world.</li> <li>It is the technology of the future!</li> </ul> <h1 id = "bugs">My 3 Favorite Bugs</h1> <p> <a href = "#features">Go to <em>Favorite Features</em></a></p> <ol> <li>Fire Fly</li> <li>Gal Ant</li> <li>Roman Tic</li> </ol> id attribute creates an internal hyperlink destination

4.7 meta Elements Specify information about a document Attributes Description name name = “keywords” name = “description” Identifies the type of meta element Provides search engines with a list of words that describe a page Provides a description of a site content Provides the information search engine use to catalog pages

Example 7: meta tags provide keywords and a description: main.html <meta> tags provide search engines with information used to catalog a site <head> <title>Internet and WWW How to Program - Welcome</title> <meta name = "keywords" content = "Web page, design, XHTML, tutorial, personal, help, index, form, contact, feedback, list, links, frame, deitel" /> <meta name = "description" content = "This Web site will help you learn the basics of XHTML and Web page design through the use of interactive examples and instruction." /> </head>

4.8  frameset Element Allow browser display more than one document simultaneously Element: frameset Sub-Element: frame Specifies the documents that will be loaded Attribute src: specifies URL of the page to display Attributes Description cols Specifies the frameset’s column layout rows Specifies the number of rows and the size of each row

<frameset cols = "110,*"> Example 8: XHTML frames document with navigation and content: index.html frame elements specify which pages are loaded into a given frame <frameset cols = "110,*"> <frame name = "leftframe" src = "nav.html" /> <frame name = "main" src = "main.html" /> <noframes> <body> <p>This page uses frames, but your browser does not support them.</p> <p>Please, <a href = "nav.html">follow this link to browse our site without frames</a>. </p> </body> </noframes> </frameset>

4.9   Nested framesets framesets within framesets

Example 9: Framed web site with a nested frameset: index2.html nested framesets are used to change the formatting and layout of the frameset <frameset cols = "110,*"> <frame name = "leftframe" src = "nav.html" /> <frameset rows = "175,*"> <frame name = "picture" src = "picture.html" /> <frame name = "main" src = "main.html" /> </frameset> <noframes> <body> <p>This page uses frames, but your browser does not support them.</p> </body> </noframes>

4.10 Web Resources www.vbxml.com/xhtml/articles/xhtml_tables www.webreference.com/xml/reference/xhtml.html