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

Slides:



Advertisements
Similar presentations
3.02D HTML Overview 3.02 Develop webpages.
Advertisements

EXtensible HyperText Markup Language Miruna Bădescu Finsiel Romania Copenhagen, 25 May 2004.
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.
XML and Enterprise Computing. What is XML? Stands for “Extensible Markup Language” –similar to SGML and HTML –document “tags” are used to define content.
Elder L. Lionel Kendrick Of the First Quorum of the Seventy It has been from the beginning and it will be till the end that the natural man will have a.
Introducing XHTML: Module C: Document Structure. Goals Understand how to use DTDsUnderstand how to use DTDs Understand the importance of backward compatibilityUnderstand.
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
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.
CS 898N – Advanced World Wide Web Technologies Lecture 21: XML Chin-Chih Chang
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.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
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.
HTML Elements. HTML documents are defined by HTML elements.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Computer Sciences Department
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.
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.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
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)
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.
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.
These Questions are copied from
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
XHTML1 Introduction to Web Pages Chapter 1. XHTML2 Objectives In this chapter, you will: Learn about the World Wide Web (WWW) Create simple Hypertext.
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.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
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:
XP 1 Creating an XML Document Developing an XML Document for the Jazz Warehouse XML Tutorial.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
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 Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
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.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
XML The Extensible Markup Language (XML ), which is comparable to SGML and modeled on it, describes how to describe a collection of data. A standard way.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Chapter 1 Introduction to JavaScript JavaScript, Third Edition.
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
CSCI N241: Fundamentals of Web Design Copyright ©2004  Department of Computer & Information Science Working with Frames.
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.
Tutorial 9 Working with XHTML. XP Objectives Describe the history and theory of XHTML Understand the rules for creating valid XHTML documents Apply a.
XHTML1 Introduction to Web Pages N100 Building a Simple Web Page.
3.00cs HTML Overview 3.00cs Develop webpages.
What is XHTML?.
WEBSITE DESIGN Chp 1
Introducing HTML & XHTML:
محمد احمدی نیا XHTML محمد احمدی نیا
Presentation transcript:

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

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand how to validate XML/XHTML markup Understand how XML/XHTML differ from HTML

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML The Web is expanding to other media, called user agents, which are devices that are capable of retrieving and processing HTML and XHTML documents

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML A user agent can be a traditional Web browser or a device such as a mobile phone or PDA, or even an application that simply collects and processes data instead of displaying it HTML is not suitable for user agents other than Web browsers

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML HTML has evolved into a markup language that is more concerned with how data appears than with the data itself Current and older versions of Web browsers allow you to write sloppy HTML code

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML Languages based on SGML use a Document Type Definition, or DTD, to define the tags and attributes that you can use in a document, and the rules the document must follow when it includes them

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML When a document conforms to an associated DTD, it is said to be valid When a document does not conform to an associated DTD, it is said to be invalid

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML You can check whether a document conforms to an associated DTD by using a program called a validating parser

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML Because HTML is based on SGML, it requires a DTD, and the HTML DTD is built directly into Web browsers When a Web browser opens an HTML document, it first compares the document to the DTD

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Evolution of XHTML If an HTML document is missing any required tags, the HTML DTD supplies them, allowing the Web browser to render the page correctly

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Basics of XML Extensible Markup Language, or XML, is used for creating Web pages and defining and transmitting data between applications Like HTML, XML is based on SGML

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Basics of XML Version 1.0 of XML achieved recommendation status by the W3C in 1998 and was still current at the time of this writing

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The Basics of XML In XML you refer to a tag pair and the data it contains as an element All elements must have an opening and a closing tag The data contained within an elements opening and closing tags is referred to as its content

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The XML Declaration XML documents should begin with an XML declaration Specifies the version of XML being used

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The XML Declaration Not required to include an XML declaration because currently only one version of XML exists, version 1.0 The encoding attribute of the XML declaration designates the language used by the XML document

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science The XML Declaration Its a good practice to always include the XML declaration because XML will almost certainly evolve into other versions that will contain features not found in version 1.0

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Parsing XML Documents When a document adheres to XMLs syntax rules, it is said to be well formed You will study XMLs rules for writing well formed documents

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Parsing XML Documents You use a program called a parser to check whether an XML document is well formed Two types of parsers: non-validating and validating

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Parsing XML Documents A non-validating parser simply checks whether an XML document is well formed A validating parser checks whether an XML document is well formed and if it conforms to an associated DTD

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Writing Well-Formed Documents Well-formed XML documents allow user agents to read the documents data easily

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Writing Well-Formed Documents User agents expect XML data to be structured according to specific rules, which allows the user agent to read data quickly without having to decipher the data structure

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science All XML Documents Must Have a Root Element A root element contains all the other elements in a document. The … element is the root element for HTML documents, although most Web browsers do not require a document to include it.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science All XML Documents Must Have a Root Element XML documents, however, require a root element that you define yourself

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science XML is Case Sensitive Unlike HTML tags, XML tags are case sensitive With XML, you cannot mix the case of elements

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science XML is Case Sensitive If you use a different case for an opening and closing tag, they will be treated as completely separate tags, resulting in a document that is not well formed

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science All XML Elements Must Have Closing Tags XML is designed to organize data, not display it. As a result, instead of documents consisting of text that contains elements, as is the case with HTML, XML documents consist of elements that contain text.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science All XML Elements Must Have Closing Tags All elements must have a closing tag or the document will not be well formed.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science XML Elements Must Be Properly Nested Nesting refers to how elements are placed inside other elements This paragraph is bold and italicized.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science XML Elements Must Be Properly Nested In an HTML document, it makes no difference how the elements are nested. XML documents require that tags be closed in the opposite order in which they were opened.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Attribute Values Must Appear Within Quotation Marks In HTML, an attribute value can be placed inside quotation marks or they may be left off. With XML, you must place quotation marks around the values assigned to an attribute

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Empty Elements Must Be Closed Several elements in HTML do not have corresponding ending tags, including the element, which inserts a horizontal rule into the document, and the element, which inserts a line break.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Empty Elements Must Be Closed Elements that do not require an ending tag are called empty elements because you cannot use them as a tag pair to enclose text or other elements.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Empty Elements Must Be Closed You can create an empty element in an XML document by adding a single slash (/) before the tags closing bracket to close the element Most often, you use an empty element for an element that does not require content, such as an image.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Combining XML and HTML Although XML was designed primarily to define data, this does not mean that you cannot use it to create Web pages.

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Combining XML and HTML You can create formatted Web pages using XML and Extensible Stylesheet Language, or XSL, which is a specification for formatting XML in a Web browser

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Combining XML and HTML To make the transition to XML-based Web pages easier, the W3C combined XML and HTML to create Extensible Hypertext Markup Language (XHTML)

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Combining XML and HTML Combination of XML and HTML that is used to author Web pages XHTML is almost identical to HTML, except that it uses strict XML syntax to describe the parts of a document

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Resources Slides were adapted from the following text & companion lectures: First Edition Dan Gosselin Published by Course Technology (2004) XHTML, Comprehensive

N241: Fundamentals of Web Development Copyright ©2004 Department of Computer & Information Science Questions?