Chapter 24 – Introduction to XHTML Basic: Part I

Slides:



Advertisements
Similar presentations
HTML I. HTML Hypertext mark-up language. Uses tags to identify elements of a page so that a browser such as Internet explorer can render the page on a.
Advertisements

HTML. The World Wide Web Protocols Addresses HTML.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 1.
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.
 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 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Tutorial 1: Getting Started with HTML5
 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.
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.
1 HTML Basics Dr. Awad Khalil Computer Science Department AUC.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
HTML (HyperText Markup Language)
WEB DESIGN USING DREAMWEAVER. The World Wide Web –A Web site is a group of related files organized around a common topic –A Web page is a single file.
 2001 Prentice Hall, Inc. All rights reserved. Lecture 1 Internet and the World Wide Web Course structure Introduction XHTML Cascading Style Sheets JavaScript.
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
XHTML1-1 Extensible HyperText Markup Language (XHTML) Xingquan (Hill) Zhu
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 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.
Just Enough HTML How to Create Basic HTML Documents.
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
1 Introduction to XHTML: Part 1 Outline Introduction Elements and Attributes Editing XHTML Common Elements W3C XHTML Validation Service Headers Linking.
WEB DESIGN AND PROGRAMMING Introduction to XHTML.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Introduction to XHTML 1 Chapter 4 Introduction to XHTML: Part 1 Reference From: Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Introduction to XHTML/HTML5 (part 1) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web (multiple editions)
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 22 - i-mode Outline 22.1 Introduction 22.2 Japan’s Telecommunications Industry and Infrastructure.
Lesson 5. XHTML Tags, Attributes and Structure XHTML Basic Structure head and body titles Paragraph headings comments Document Presentation Manipulating.
Introduction to HTML5.
Introduction to HTML.
HTML Basics.
HTML basics
Creating and Linking Web Pages
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Chapter 4 Introduction to XHTML: Part 1
Chapter 4 Introduction to XHTML: Part 1
Chapter 1: Introduction to XHTML (part 1)
Introduction to XHTML.
Chapter 4 - Introduction to XHTML: Part 1
COMPUTING FUNDAMENTALS
Computers and Scientific Thinking David Reed, Creighton University
Basic HTML and Embed Codes
Chapter 4 - Introduction to XHTML: Part 1
1 Introduction to XHTML.
Introduction to HTML- Basics
Chapter 4 - Introduction to XHTML: Part 1
Pertemuan 1b
Computer Science Department
Chapter 16 The World Wide Web.
<html> This tag is used to begin each html document
Introduction to HTML.
Pertemuan 1 Desain web Pertemuan 1
Chapter 4 - Introduction to XHTML: Part 1
Presentation transcript:

Chapter 24 – Introduction to XHTML Basic: Part I Outline 24.1 Introduction 24.2 Common Elements 24.3 Headers 24.4 Linking 24.5 Images 24.6 Special Characters and More Line Breaks 24.7 Internet and World Wide Web Resources

24.1 Introduction XHTML Basic Extensible Hypertext Markup Language, Basic Subset of XHTML used for wireless and small devices W3C recommendation www.w3.org/TR/xhtml-basic WAP 2.0 Specifies XHTML to replace WML Maintain WML extensions Derived from XML Excludes processor intensive features of XHTML Write with a text editor Pixo Microbrowser renders XHTML Basic documents

24.2 First XHTML Basic Example Tags Name element contain text to display or commands to perform Start tag <> Defines beginning of text enclosure End tag </> Defines end of text enclosure Atrributes Provide additional information about tag element Name and value separated by = Tags must be nested and cannot overlap

Fig24_01.html Displays a “Welcome” message. 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 3 "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> 4 5 <!-- Fig. 24.1: Fig24_01.html --> 6 <!-- Our first Web page --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Welcome</title> 11 </head> 12 13 <body> 14 15 <!-- Displays a welcome message --> 16 <p><h1>Welcome to XHTML Basic!</h1></p> 17 </body> 18 </html> Commenting (notes) within the code which the browser ignores title element is used to name Web documents Required lines for proper XHTML syntax head element contains information about the document End tag Open tag Fig24_01.html Displays a “Welcome” message. Blank lines ensure readability, browser does not recognize them body element contains document content. Paragraph tags <p> and </p> mark up text for browser display. </html> tag closes XHTML Basic document

Fig24_01.html (Courtesy of Pixo) Pixo Microbrowser displays XHTML Basic document Fig24_01.html (Courtesy of Pixo)

Header elements indicate relative importance of contained text 24.3 Headers Header elements indicate relative importance of contained text h1 through h6 Each is a relatively smaller font size

Fig24_02.html Displays text using header tags to change font size. 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 3 "http://www.w3.org/TR/xhtml-basic/DTD/xhtml-basic10dtd"> 4 5 <!-- Fig. 24.2: Fig24_02.html --> 6 <!-- XHTML Basic headers --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Using Headers</title> 11 </head> 12 13 <body> 14 15 <!-- Render text as headers --> 16 <h1>Level 1 header</h1> 17 <h2>Level 2 header</h2> 18 <h3>Level 3 header</h3> 19 <h4>Level 4 header</h4> 20 <h5>Level 5 header</h5> 21 <h6>Level 6 header</h6> 22 </body> 23 </html> Fig24_02.html Displays text using header tags to change font size. Header tags encapsulate text As header number increases, font size decreases.

Fig24_02.html (Courtesy of Pixo) Pixo Microbrowser displays XHTML Basic document Fig24_02.html (Courtesy of Pixo)

24.4 Linking Hyperlink References or links to other resources XHTML Basic documents Images Anchor <a> element Creates links

<strong> tag creates bold text in most browsers 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 3 "http://www.w3.org/TR/xhtml-basic/DTD/xhtml-basic10.dtd"> 4 5 <!-- Fig. 24.3: Fig24_03.html --> 6 <!-- Introduction to hyperlinks --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Links</title> 11 </head> 12 13 <body> 14 <p><strong>Select a Web site</strong></p> 15 16 <!-- Create a hyperlink --> 17 <p><a href = "http://www.deitel.com"> 18 Deitel & Associates</a></p> 19 20 <p><a href = "http://www.prenhall.com">Prentice Hall</a></p> 21 22 </body> 23 </html> Fig24_03.html <strong> tag creates bold text in most browsers Defines a link to the Deitel & Associates Web site using the href attribute (specifies location of linked source) Text between <a> and </a> appears as the link on the Web page

Fig24_03.html Creating a hyperlink with XHTML Basic Hyperlinks are underlined blue. Fig24_03.html Creating a hyperlink with XHTML Basic (Courtesy of Pixo) (Courtesy of Pixo)

Use images with XHTML basic Create own with graphics software Adobe Photoshop Jasc Paint Shop Pro GIF and JPEG Download free images from the Web gallery.yahoo.com Incorporate images into a Web page Must be small for wireless Web clients

Fig24_04.html Displays an image 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 3 "http://www.w3.org/TR/xhtml-basic/DTD/xhtml-basic10.dtd"> 4 5 <!-- Fig. 24.4: Fig24_04.html --> 6 <!-- Adding images with XHTML Basic --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Using an image</title> 11 </head> 12 13 <body> 14 15 <!-- Format for inserting an image: --> 16 <!-- <img src = "location/filename" --> 17 <p><img src = "bug.gif" height = "40" width = "40" 18 alt = "bug image" /></p> 19 </body> 20 </html> alt attribute (required) provides alternative text to browsers that cannot render images. Fig24_04.html Displays an image Self-closing tag. Same as using <img></img>. Can only be used on tags which do not contain any text img element used to place image in a Web document src attribute specifies image file location height and width attributes specify image dimensions

Fig24_04.html (Courtesy of Pixo)

24.5 Images Fig. 24.5 Internet Explorer 5.5 rendering an alt attribute’s value.

Fig24_06.html Creating hyperlinked images 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 3 "http://www.w3.org/TR/xhtml-basic/DTD/xhtml-basic10.dtd"> 4 5 <!-- Fig. 24.6: Fig24_06.html --> 6 <!-- Using images as link anchors --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Navigation Bar</title> 11 </head> 12 13 <body> 14 <p> 15 16 <!-- Creates a hyperlinked image --> 17 <a href = "links.html"> 18 <img src = "buttons/links.jpg" width = "65" 19 height = "50" alt = "Links Page" /> 20 </a><br /> 21 22 <a href = "list.html"> 23 <img src = "buttons/list.jpg" width = "65" 24 height = "50" alt = "List Example Page" /> 25 </a><br /> 26 27 <a href = "contact.html"> 28 <img src = "buttons/contact.jpg" width = "65" 29 height = "50" alt = "Contact Page" /> 30 </a><br /> 31 </p> 32 </body> 33 </html> Fig24_06.html Creating hyperlinked images img element nested within an anchor (a) element br element (line break)

Fig24_06.html Images which act as hyperlinks (Courtesy of Pixo) (Courtesy of Pixo) (Courtesy of Pixo)

24.6 Special Characters and More Line Breaks Characters and symbols which are difficult to embed into XHTML Basic document Syntax errors <p>if x < 10 then increment x by 1</p> Less than character (<) returns a syntax error Reserved for opening and closing tags Special characters Entity references (&code;) Corrected line:

Fig24_07.html Special characters 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" 3 "http://www.w3.org/TR/xhtml-basic/DTD/xhtml-basic10.dtd"> 4 5 <!-- Fig. 24.7: Fig24_07.html --> 6 <!-- Inserting special characters --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Special Characters and Line Breaks</title> 11 </head> 12 13 <body> 14 <p> 15 16 <!-- Special characters have the form &code; --> 17 All information on Deitel<strong>'</strong>s 18 Web site is <strong>©</strong> Deitel 19 <strong>&</strong> Associates, Inc. 1995-2001. 20 21 <hr /> <!-- Inserts a horizontal rule --> 22 <br />Permission is required if you need to use 23 any information from this Web site. 24 <br />Statistically, <strong>> ½</strong> 25 of our Web site visitors are from outside the 26 United States. 27 </p> 28 </body> 29 </html> Fig24_07.html Special characters Special characters Copyright symbol Fraction 1/2 Greater than (>) character

Fig24_07.html Special characters (Courtesy of Pixo) (Courtesy of Pixo)