History Leading to 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

XHTML Week Two Web Design. 2 What is XHTML? XHTML is the current standard for HTML Newest generation of HTML (post-HTML 4) but has many new features which.
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.
Pengantar Teknologi Mobile 13 Antonius Rachmat C, S.Kom, M.Cs XHTML.
Tutorial 9 Working with XHTML
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.
4.01 Cascading Style Sheets
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
Developing a Basic Web Page Posting Files on UMBC
© Ms. Masihi 1.  A web page is created using a language called, Hypertext Markup Language, better known as HTML Code.  HTML is a user friendly language.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Creating a Simple Page: HTML Overview
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.
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
2440: 211 Interactive Web Programming Introduction to the Internet & the World Wide Web.
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 HTML XHTML. 2 Understand the Doctype tag Know the html tags which are now classed as depreciated Understand how Dreamweaver adds styles Add styles to.
August Chapter 2 - Markup and Core Concepts Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
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.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
1 Chapter 10: XML What is XML What is XML Basic Components of XML Basic Components of XML XPath XPath XQuery XQuery.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
Lesson 4.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
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.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
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.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
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.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
XP 1 HTML Tutorial 1: Developing a Basic Web Page.
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.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XML Introduction to XML Extensible Markup Language.
CITA 330 Section 2 DTD. Defining XML Dialects “Well-formedness” is the minimal requirement for an XML document; all XML parsers can check it Any useful.
Extensible Markup Language (XML) Pat Morin COMP 2405.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
Creating a Well-Formed Valid Document
CITA 330 Section 3 XHTML.
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
What is XHTML?.
Cascading Style Sheets - Building a stylesheet
XHTML
Tutorial 9 Working with XHTML
XHTML 7-May-19.
Cascading Style Sheets - Building a stylesheet
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Presentation transcript:

History Leading to XHTML SGML (Standard Generalized Markup Language) can be used with almost any type of document stored in almost any format introduced in the 1980s metalanguage– used to created other languages HTML confusing standards among browsers derived from SGML XML (Extensible Markup Language) also used to design markup languages a “lite” version SGML

History Leading to XHTML - continued XHTML is a reformulation of HTML, written in XML Versions of XHTML In 2009, the W3C discontinued definition of XHTML 2.0 in favor of HTML 5

Well Formed and Valid Documents An XML document (including XHTML) with correct syntax is a well-formed document. A well-formed document with correct content and structure is a valid document. A Document Type Definition (DTD) specifies correct content and structure.

3 DTDs Are Associated with XHTML 1.0 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.

Rules for Well-Formed XHTML

Rules for Well-Formed XHTML XHTML documents must have a single root element that contains all other elements. This root element is, of course, <html> Attribute minimization, when some attributes lack an attribute value, is not allowed in XHTML.

Prohibited Elements in Valid XHTML applet: alternative for inserting Java applets basefont: set font properties center: centered text dir: another list type font: set font properties iframe: inline frames isindex: alternative to <input> tag for text menu: another list type s: strikethrough text strike: strikethrough text u: underlined text

Prohibited Children in Valid HTML <body> <body> <img src=“pic.gif” /> <p><img src=“pic.gif” /></p> </body> </body>

Prohibited Attributes in Valid XHTML

Required Attributes in Valid XHTML

Initial Declarations in XHTML Documents: Step 1 The first line of an XHTML document should contain a declaration indicating that the document adheres to the rules and syntax of XML Enter the following as the first line of the file: <?xml version=“value” encoding=“type” standalone=“type” ?> Where the version attribute indicates the XML version of the document, the encoding attribute specifies the character encoding, and the standalone attribute indicates whether the document contains references to an external DTD.

Initial Declarations in XHTML Documents: Step 2 Add a DOCTYPE declaration to indicate which DTD you’re using:

Initial Declarations in XHTML Documents: Step 3 A namespace is a unique identifier for elements and attributes originating from a particular document type (like XHTML or MathML) The default namespace is applied to a root element and any element within it. It is declared with:

Testing an XHTML Document To test your document, you need to send the file to an XML parser or an XHTML validator. The W3C provides an XHTML validator on their website: http://validator.w3.org You upload your file to the site and get a report:

Report Showing a Successful Validation

Validating XHTML with Style Sheets Validators can get confused by some stylesheets: <style type=“text/css”> p > img {float: left} < /style> You must separate the file into PCDATA and CDATA. Parsed character data (PCDATA) is text to be parsed by a browser or parser. Unparsed character data (CDATA) is text not to be processed by the browser or parser. A CDATA section marks a block of text as CDATA so that parsers ignore any text within it: <! [CDATA[ ]]>

Tips for Converting old HTML Code to XHTML 1. Include an xml declaration in the first line of your file so that your document can be accessed by XML parsers. 2. Add a DOCTYPE declaration for one of the XHTML DTDs and check your document for well-formedness and validity whenever you make a change to the code. 3. Add the XHTML default namespace to the html element of your document. 4. Make sure that all element and attribute names are in lowercase letters and that all attribute values are placed in quotes. 5. Make sure that all empty elements are entered as one-sided tags. Look especially for improper syntax in the img, hr, and br elements. 6. Make sure that all two-sided tags are properly closed. Old HTML code often does not have closing tags for the p element.

Tips for Converting old HTML Code to XHTML 7. Make sure that all inline images contain the alt attribute. 8. Look for deprecated attributes such as align, bgcolor, and background and replace them with the float (or text-align), background-color, and background-image styles. 9. Replace the name attribute with the id attribute 10. Fix all instances of attribute minimization. 11. Replace the use of the font element with either the span element or with a style that applies the same formatting specified by the font element. 12. Replace the use of the width attribute in the td or th element with the width style.