XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.

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.
XHTML Basics.
1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
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.
History Leading to XHTML
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
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.
Tutorial 11 Creating XML Document
Developing a Basic Web Page with HTML
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
Introduction to XML This material is based heavily on the tutorial by the same name at
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.
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.
CS 299 – Web Programming and Design Introduction to HTML.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Web page - A Web page is a simple text file that contains a set of HTML tags (code) that describe (to the browser) what should go on a web page. It may.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
3 XHTML.
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.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
Lesson 4.
XHTML By Trevor Adams. Topics Covered XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
IT Engineering I Instructor: Rezvan Shiravi
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
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.
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.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
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 © 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.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
Hyper Text Markup Language.  My First Heading My first paragraph. Example Explained The DOCTYPE declaration defines the document type The text between.
Glencoe Introduction to Web Design Chapter 4 XHTML Basics 1 Review Do you remember the vocabulary terms from this chapter? Use the following slides to.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Creating a Well-Formed Valid Document
CITA 330 Section 3 XHTML.
Tutorial 9 Working with XHTML
Tutorial 9 Working with XHTML
XHTML
Tutorial 9 Working with XHTML
CIS 133 mashup Javascript, jQuery and XML
XHTML 7-May-19.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Presentation transcript:

XP Tutorial 9 1 Working with XHTML

XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard capable of specifying many different types of markup languages. Device and System Independent MML: Math Markup Language is a markup language: Rendering Code

XP SGML  HTML SGML  XML  XHTML 3 SGML RULES HTML XML RULES XHTML Inconsistent, browser support difficult Consistent rules for efficient browser support Many other markup languages Other XML languages

XP HTML and XHTML 4 HTML (Hypertext Markup Language) 1998: Version 4.0 most current (4.01 not officially implemented) Can be applied inconsistently Browser code must be complex, inefficient, to handle inconsistencies. XHTML (Extensible Hypertext Markup Language) 2002: Version 1.1 most current (1.0 still extensively used) Strict standards for consistency. Browser code can be efficient, run on small devices.

XP XHTML Versions 5

XP About XHTML Documents 1. An XHTML document that correctly follows the syntax rules is called a well-formed document. 2. Because XHTML documents conform to XML rules, enter an “XML declaration” (XML Prolog) as the first line of the file. 3. A special document called a “DTD” (document type definition) is used to specify correct content and structure. 4. A special attribute called the “xhtml namespace” is inserted in the opening tag. 5. If the document is well-formed and also has correct content and structure, it is called a valid document. 6

XP An XHTML document that correctly follows the syntax rules is called a well-formed document. 7 “attribute minimization” not allowed

XP Because XHTML documents conform to XML rules, enter an “XML declaration” (XML Prolog) as the first line of the file. 8 For XHTML documents, use the declaration: XML Version number character encoding

XP A special document called a “DTD” (document type definition) is used to specify correct content and structure. 9 The DOCTYPE declaration, which tells which DTD is associated with the document, is the second line of the file, after the XML prolog statement. It is used to tell the browser what version of the markup language the page is written in.

XP Document Type Definition (“DTD”) 10 - The DTD specifies the rules for a valid document - There are 3 types of the XHTML DTD - Transitional: allows many of the older HTML features but not framesets - Frameset: allows many of the older HTML features including framesets - Strict: does not allow any presentational features or deprecated HTML elements and attributes. Does not support frames or inline frames. Used when there is a need to strictly conform to the latest standards - There are also definitions for straight HTML documents. dtd_list.txtdtd_list.txt This link can also be found on my Data for Labs page

XP Document Elements that are not valid under the Strict DTD 11 Elements not allowed under the strict DTD are: applet basefont center dir font frame frameset iframe isindex menu noframes s strike u List and description of all tags

XP Attributes under the Strict DTD 12 Some attributes are restricted, while others are required in XHTML Restricted (prohibited) attributes under the strict XHTML DTD are shown on page 536 of the textbook. Required attributes under the strict XHTML DTD are shown on page 537 of the textbook.

XP Attributes Prohibited under the Strict DTD 13

XP Attributes Required under the Strict DTD 14

XP A special attribute called the “xhtml namespace” is inserted in the opening tag. 15 To set XHTML as the default namespace for a document, add the xmlns attribute to the html element with the following value: A namespace is any string of characters that uniquely identifies the set of elements and attributes belonging to the particular language. dtd_list.txtdtd_list.txt This link can also be found on my Data for Labs page

XP If the document is well-formed and also has correct content and structure, it is called a valid document 16 This is an example of an xhtml document that correctly conforms to the “Strict” DTD XHTML can be checked for validation at

XP Validation of XHTML 17 Click “Validate by File Upload” Click “Browse”

XP Validation of XHTML 18 Select the file you want to validate Click “Check”

XP Validation of XHTML 19 If it is valid, you get “…successfully checked...”

XP Validation of XHTML 20 This is an example of an xhtml document that does not conform to the “Strict” DTD (Can you see the error?)

XP Validation of XHTML 21 If it is not valid you get “Error found... “ “bgcolor” is not allowed under the strict DTD

XP Validation of XHTML 22 To validate under a different version of the DTD, change the DOCTYPE declaration

XP Using Style Sheets and XHTML 23 Style sheets sometimes contain characters that could cause problems for the browser: A CDATA section marks a block of text so that the browser will not treat text as html code: > means any img element that is a direct descendent of a p element. If your code contains characters like >, it’s best to use an external style sheet instead of an embedded one.

XP Fixing XHTML Validation Errors 24 Some examples of things you might need to do to make an xhtml file pass the validator check: Convert body element attributes to styles in a style sheet.

XP Fixing XHTML Validation Errors 25 Some examples of things you might need to do to make an xhtml file pass the validator check: Correct errors for one or two-sided elements not properly closed or one-sided tags not terminated.

XP Fixing XHTML Validation Errors 26 Some examples of things you might need to do to make an xhtml file pass the validator check: Use the float style to align inline images. 180-img-styles.htm

XP Fixing XHTML Validation Errors 27 Some examples of things you might need to do to make an xhtml file pass the validator check: Remove/replace deprecated elements or attributes. 185-img-styles.htm

XP Fixing XHTML Validation Errors 28 Some examples of things you might need to do to make an xhtml file pass the validator check: Remove/replace deprecated elements or attributes.

XP Fixing XHTML Validation Errors 29 Some examples of things you might need to do to make an xhtml file pass the validator check: Remove/replace deprecated elements or attributes.

XP Fixing XHTML Validation Errors 30 Some examples of things you might need to do to make an xhtml file pass the validator check: Replace formatting done with and or by styles.

XP Fixing XHTML Validation Errors 31 Some examples of things you might need to do to make an xhtml file pass the validator check: Replace prohibited attributes such as name with a valid attribute such as id

XP The End 32