Tutorial 9 Working with XHTML

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
 Fundamentals of Web Design.  Describe the history and theory of XHTML  Understand the rules for creating valid XHTML documents  Apply a DTD to an.
History Leading to XHTML
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 2 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
XHTML 16-Apr-17.
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Creating a Well-Formed Valid Document. 2 Objectives Introducing XHTML Creating a Well-Formed Document Creating a Valid Document Creating an XHTML Document.
Tutorial 11 Creating XML Document
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Working with Namespaces Combining XML Vocabularies in a Compound Document.
WORKING WITH NAMESPACES
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Working with XHTML Creating a Well-Formed Valid Document.
XP Tutorial 9New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
XP The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 140 Internet Tools Instructor: Enoch E. Damson.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
2440: 211 Interactive Web Programming Introduction to the Internet & the World Wide Web.
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
1 © Netskills Quality Internet Training, University of Newcastle Introducing XML © Netskills, Quality Internet Training University.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
3 XHTML.
XML 1 Enterprise Applications CE00465-M XML. 2 Enterprise Applications CE00465-M XML Overview Extensible Mark-up Language (XML) is a meta-language that.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorial 9: Working With XHTML.
XP 1 DECLARING A DTD A DTD can be used to: –Ensure all required elements are present in the document –Prevent undefined elements from being used –Enforce.
Tutorial 1: XML Creating an XML Document. 2 Introducing XML XML stands for Extensible Markup Language. A markup language specifies the structure and content.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Lesson 4.
IT Engineering I Instructor: Rezvan Shiravi
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
XP New Perspectives on XML, 2nd Edition Tutorial 2 1 TUTORIAL 2 WORKING WITH NAMESPACES.
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
The eXtensible Markup Language (XML). Presentation Outline Part 1: The basics of creating an XML document Part 2: Developing constraints for a well formed.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
Tutorial 13 Validating Documents with Schemas
1 Tutorial 12 Working with Namespaces Combining XML Vocabularies in a Compound Document.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
Web Technologies Lecture 2 HTML and CSS. HTML Hyper Text Markup Language – Describes web documents – Made up of nested HTML markup tags – Tags are the.
1 Compound Documents: Combining XML Vocabularies.
XML DTD. XML Validation XML with correct syntax is "Well Formed" XML. XML validated against a DTD is "Valid" XML.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 2: Markup Language and Site Development Essentials © 2007 Prosoft Learning Corporation All.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XP 1Creating Web Pages with XML Tutorial 1 New Perspectives on XML Tutorial 1 – Creating an XML Document.
Extensible Markup Language (XML) Pat Morin COMP 2405.
Creating a Well-Formed Valid Document
CITA 330 Section 3 XHTML.
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
WORKING WITH NAMESPACES
Creating an XML Document
Tutorial 9 Working with XHTML
Presentation transcript:

Tutorial 9 Working with XHTML

Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a DTD to an XHTML document Understand how to apply the XHTML namespace Explore the relationship between HTML5 and XHTML Test an XHTML document under the transitional DTD Test an XHTML document under the strict DTD Explore the use of character and parsed character data New Perspectives on HTML and CSS, Comprehensive

Structure of an XHTML Document New Perspectives on HTML and CSS, Comprehensive

Introducing XHTML SGML (Standard Generalized Markup Language) Device-independent and system-independent Introduced in the 1980s Not intended for the World Wide Web HTML Standards get confusing among browsers Can be applied inconsistently New Perspectives on HTML and CSS, Comprehensive

Introducing XHTML New Perspectives on HTML and CSS, Comprehensive

Creating an XHTML Document The first line of an XHTML file contains a statement called a prolog that indicates the document adheres to the syntax rules of XML. The form of the XML prolog is <?xml version=”value” encoding=”type” ?> New Perspectives on HTML and CSS, Comprehensive

Creating Well-Formed Documents XML documents must be evaluated with an XML parser An XML document with correct syntax is a well-formed document New Perspectives on HTML and CSS, Comprehensive

Creating Well-Formed Documents New Perspectives on HTML and CSS, Comprehensive

Creating a Well-Formed Document XHTML documents must also include a single root element that contains all other elements For XHTML, that root element is the html element Attribute minimization is when some attributes lack attribute values XHTML doesn’t allow attribute minimization New Perspectives on HTML and CSS, Comprehensive

Attribute Minimization in HTML and XHTML New Perspectives on HTML and CSS, Comprehensive

Creating Valid XHTML Documents A valid document is a well-formed document that also contains only those elements, attributes, and other features that have been defined for the XML vocabulary that it uses To specify the correct content and structure for a document, the developers of an XML-based language can create a collection of rules called the document type definition or DTD New Perspectives on HTML and CSS, Comprehensive

Creating Valid XHTML Documents New Perspectives on HTML and CSS, Comprehensive

DTDs Transitional: supports many of the presentational features of HTML, including the deprecated elements and attributes. Best used for older documents that contain deprecated features. Frameset: used for documents containing frames, and also supports deprecated elements and attributes Strict: does not allow any presentational features or deprecated HTML elements and attributes. Does not support frames or inline frames. It is best used for documents that need to strictly conform to the latest standards New Perspectives on HTML and CSS, Comprehensive

Creating Valid XHTML Documents The DTD used depends on the content of the document and the needs of your users To support old browsers, use the transitional DTD To support old browsers in a framed Web site, use the frameset DTD To support more current browsers and to weed out any use of deprecated features, use the strict DTD New Perspectives on HTML and CSS, Comprehensive

Creating a Valid Document Elements not allowed under the strict DTD: applet noframes basefont s center strike dir u font isindex menu New Perspectives on HTML and CSS, Comprehensive

Creating a Valid Document Some attributes are restricted, while others are required in XHTML New Perspectives on HTML and CSS, Comprehensive

Attributes Prohibited in the Strict DTD New Perspectives on HTML and CSS, Comprehensive

Required XHTML Attributes New Perspectives on HTML and CSS, Comprehensive

Inserting the DOCTYPE Declaration To specify which DTD is used by an XML document, you add a DOCTYPE declaration directly after the XML prolog <!DOCTYPE root type “id” “url”> New Perspectives on HTML and CSS, Comprehensive

Inserting the DOCTYPE Declaration New Perspectives on HTML and CSS, Comprehensive

The XHTML Namespace A namespace is a unique identifier for elements and attributes originating from a particular document type (like XHTML or MathML) Two types of namespaces: Default: applied to any element or attribute in the document <root xmlns=“namespace”> New Perspectives on HTML and CSS, Comprehensive

The XHTML Namespace Local: applies to only select elements Each element in the local namespace is marked by a prefix attached to the element name xmlns: prefix=“namespace” Identify any element belonging to that namespace by modifying the element name in the tag prefix:element New Perspectives on HTML and CSS, Comprehensive

Setting the XHTML Namespace To set XHTML as the default namespace for a document, add the xmlns attribute to the html element with the following value: <html xmlns=http://www.w3.org/1999/xhtml> New Perspectives on HTML and CSS, Comprehensive

HTML5 and XHTML HTML5 was developed to be backward compatible with earlier versions of HTML, and also to support the common application of HTML syntax The rules for HTML5 are much more open than for XHTML New Perspectives on HTML and CSS, Comprehensive

HTML5 and XHTML New Perspectives on HTML and CSS, Comprehensive

Validating an XHTML Document New Perspectives on HTML and CSS, Comprehensive

Validating Under XHTML Transitional New Perspectives on HTML and CSS, Comprehensive

Testing Under XHTML Strict To test under another DTD, you’ll need to change the DOCTYPE declaration New Perspectives on HTML and CSS, Comprehensive

Using Embedded Style Sheets in XHTML Parsed character data (PCDATA) is text processed by a browser or parser Unparsed character data (CDATA) is text not processed by the browser or parser A CDATA section marks a block of text as CDATA so that parsers ignore any text within it New Perspectives on HTML and CSS, Comprehensive