3 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.
Dr. Alexandra I. Cristea XHTML.
3/10/11 Lecture 2. W3C - 2 The World Wide Web consortium was created in October 1994 to lead the World Wide Web to its full potential by developing common.
1 HTML Standards & Compliance. 2 Minimum Required HTML tags: (must go in this order!)
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.
CO1552 – Web Application Development An introduction to the use of Extensible Hypertext Mark-up Language - XHTML.
History Leading to XHTML
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 2 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Tutorial 9 Working with XHTML
XHTML 16-Apr-17.
XHTML. XHTML is one of the many XML-based languages that have been defined XHTML is, essentially, a “cleaned-up” version of HTML 4, reformulated using.
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.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
HTML 4 - Introduction HTML stands for Hyper Text Markup Language. It is the standard format for documents on the World Wide Web. Just as Microsoft Word.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
Introduction to XHTML Professor Stephen Kwan. 2 XHTML HTML StyleSheets XML CascadingStyleSheets(CSS) ExtensibleStylesheetLanguage(XSL) StructureFormatContent.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
© 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.
CS 415 N-Tier Application Development By Umair Ashraf July 16,2013 National University of Computer and Emerging Sciences Lecture # 12 HTML/ XHTML/ HTML5.
Computer Sciences Department
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.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
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.
CS 299 – Web Programming and Design Introduction to HTML.
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.
XHTML - Basics Teppo Räisänen LIIKE/OAMK Introduction XHTML = eXtensible Hypertext Markup Language Transitional ~ HTML 4.01 Goal: to replace HTML.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
1 HTML intro The development of HTMLThe development of HTML The transition from HTML to XHTMLThe transition from HTML to XHTML XHTML syntax, tags, and.
XHTML Instructor: Charles Moen CSCI/CINF XHTML  A stricter version of HTML  Extensible HTML  The XHTML specification is maintained by the World.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
XHTML Presentation by Kevin See June 16, XML in HTML Meeting Report  May 11, 1998  html
Extensible HyperText Markup Language (XHTML) Laboratory of Intelligent Youn-Hee Han.
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.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XHTML Web and Database Management System. HTML’s History HTML was initially defined by Tim-Berners-Lee in 1990 at CERN (European Organization for Nuclear.
1 Web Developer Foundations: Using XHTML Chapter 2 Key Concepts.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
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.
WEB APPLICATION DEVELOPMENT For More visit:
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
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.
Tutorial 9 Working with XHTML. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Describe the history and theory of XHTML.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XML by Cheryl M. Hughes.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
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.
W3C Web standards and Recommendations
What is XHTML?.
XHTML
XHTML 7-May-19.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Presentation transcript:

3 XHTML

What is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is the next generation of HTML 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 a reformulation of HTML into a language that conforms to the XML 1.0 Recommendation XHTML Family document types are all XML-based, and ultimately are designed to work in conjunction with XML-based user agents

Why XHTML? XHTML is a combination of HTML and XML XML is a markup language where everything has to be marked up correctly, which results in "well-formed" documents XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML We have reached a point where many pages on the WWW contain "bad" HTML XHTML pages can be read by all XML enabled devices

How is XHTML better than HTML? Extensibility: it is a metalanguage, which enables one to write a Document Type Definition (DTD) and define the rules of the language so the document can be interpreted by the document receiver . Portability: much of Internet access could be carried out on non-PC platforms such as palm computers, televisions, automobiles, telephones, etc. In most cases these devices will not have the computing power of a desktop computer, and will not be designed to accommodate ill-formed HTML as do current browsers (bloated with code to handle sloppy or proprietary HTML).

Differences Between XHTML and HTML The Most Important Differences: XHTML elements must be properly nested XHTML documents must be well-formed Tag names must be in lowercase All XHTML elements must be closed

Elements Must Be Properly Nested In HTML some elements can be improperly nested within each other like this: <b><i>This text is bold and italic</b></i> In XHTML all elements must be properly nested within each other like this: <b><i>This text is bold and italic</i></b> A common mistake in nested lists, is to forget that the inside list must be within an li element

Documents Must Be Well-formed All XHTML elements must be nested within the <html> root element All other elements can have sub (children) elements. Sub elements must be in pairs and correctly nested within their parent element. The basic document structure is: <html> <head> ... </head> <body> ... </body> </html>

Tag Names Must Be in Lower Case This is because XHTML documents are XML applications XML is case-sensitive Tags like <br> and <BR> are interpreted as different tags

All XHTML Elements Must Be Closed Non-empty elements must have an end tag Empty Elements Must also Be Closed Empty elements must either have an end tag or the start tag must end with /> This is a break<br /> Here comes a horizontal rule:<hr /> Here's an image <img src="happy.gif" alt="Happy face" />

XHTML Syntax Writing XHTML demands a clean HTML syntax Some more XHTML Syntax Rules: Attribute names must be in lower case Attribute values must be quoted Attribute minimization is forbidden The id attribute replaces the name attribute The XHTML DTD defines mandatory elements

Attribute Minimization is Forbidden

The id Attribute replaces the Name Attribute HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map In XHTML the name attribute is deprecated. Use id instead. <img src="picture.gif" id="picture1" /> To make your XHTML compatible with today's browsers, you should add an extra space before the "/" symbol

Mandatory XHTML Elements All XHTML documents must have a DOCTYPE declaration This is a minimum XHTML document template: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>... </title> </head> <body> ... </body> </html>

XHTML Document Type Definitions (DTD) The <!DOCTYPE> is Mandatory The 3 Document Type Definitions DTD specifies the syntax of a web page in SGML An XHTML DTD describes in precise the allowed syntax and grammar of XHTML markup. There are currently 3 XHTML 1.0 document types: STRICT TRANSITIONAL FRAMESET

The 3 Document Type Definitions XHTML 1.0 Strict Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets. XHTML 1.0 Transitional Use this when you need to take advantage of HTML's presentational features and when you want to support browsers that don't understand Cascading Style Sheets. XHTML 1.0 Frameset Use this when you want to use HTML Frames to partition the browser window into two or more frames. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML Validation An XHTML document is validated against a Document Type Definition (DTD) Test your XHTML with the W3C Validator http://validator.w3.org/ XHTML Tag List http://www.w3schools.com/xhtml/xhtml_reference.asp XHTML Attributes http://www.w3schools.com/xhtml/xhtml_standardattributes.asp

W3C Recommendations XHTML 1.0 (Recommendation since January 2000) Three "flavors" of XHTML 1.0: XHTML 1.0 Strict XHTML 1.0 Transitional XHTML 1.0 Frameset The complete XHTML Basic (Recommendation since December 2000) XHTML Basic is the second Recommendation in a series of XHTML specifications. The XHTML Basic document type includes the minimal set of modules required to be an XHTML Host Language document type. It includes images, forms, basic tables, and object support. It is designed for Web clients that do not support the full set of XHTML features; such as mobile phones, PDAs, pagers, and settop boxes.

… W3C Recommendations Modularization of XHTML (Recommendation since April 2001) Modularization of XHTML is the third Recommendation in a series of XHTML specifications. This Recommendation specifies an abstract modularization of XHTML and an implementation of the abstraction using XML Document Type Definitions (DTDs). This modularization provides a means for subsetting and extending XHTML, a feature needed for extending XHTML's reach onto emerging platforms. Modularization of XHTML will make it easier to combine with markup tags for things like vector graphics, multimedia, math, electronic commerce and more.

… W3C Recommendations XHTML 1.1 - Module-based XHTML (Recommendation since May 2001) While XHTML 1.1 looks very similar to XHTML 1.0 Strict, it is designed to serve as the basis for future extended XHTML Family document types, and its modular design makes it easier to add other modules as needed or integrate itself into other markup languages. XHTML 2.0 (first working draft – August 2002) XHTML 2.0 is a markup language intended for rich, portable web-based applications. While the ancestry of XHTML 2.0 comes from HTML 4, XHTML 1.0, and XHTML 1.1, it is not intended to be backward compatible with its earlier versions.