محمد احمدی نیا ahmadinia@gmail.com XHTML محمد احمدی نیا ahmadinia@gmail.com.

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.
 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
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.
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
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.
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.
 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.
XHTML - Basics Teppo Räisänen LIIKE/OAMK Introduction XHTML = eXtensible Hypertext Markup Language Transitional ~ HTML 4.01 Goal: to replace HTML.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
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 Presented by Kelly(Geun-young) Yim. Learning Objectives  List the difference between XHTML and HTML  Create a valid, well-formed XHTML document.
XHTML Presentation by Kevin See June 16, XML in HTML Meeting Report  May 11, 1998  html
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
3 XHTML.
Extensible HyperText Markup Language (XHTML) Laboratory of Intelligent Youn-Hee Han.
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.
Lesson 4.
IT Engineering I Instructor: Rezvan Shiravi
WEB APPLICATION DEVELOPMENT For More visit:
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.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to 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.
XHTML. What Is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is almost identical to HTML XHTML is stricter than HTML XHTML is HTML.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
CIS 228 The Internet 9/20/11 XHTML 1.0.
Creating a Well-Formed Valid Document
CITA 330 Section 3 XHTML.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Internet Technology and Website Design
Introduction to HTML.
Building Blocks of a Web Page HTML, HTML 5, CSS & XHTML
W3C Web standards and Recommendations
What is XHTML?.
Basic HTML/xHTML.
Chapter 4 Introduction to XHTML: Part 1
Chapter 1: Introduction to XHTML (part 1)
Introduction to XHTML.
INP150: Basic HTML Instructor: Paul J. Millis
XHTML
Introducing HTML & XHTML:
HTML A brief introduction HTML.
XHTML Review Anita Philipp Updated Spring 2016.
Instructor: Charles Moen
Creating a Basic Web Page
XHTML 7-May-19.
XHTML 29-May-19.
Web Design & Development
Creating Web Documents
Presentation transcript:

محمد احمدی نیا ahmadinia@gmail.com XHTML محمد احمدی نیا ahmadinia@gmail.com

HTML vs XHTML XHTML is a stricter and cleaner version of HTML. by combining the strengths of HTML and XML, XHTML was developed XHTML is HTML 4.01 redesigned as XML. correctly and "well-formed“ زبانهای برنامه سازی وب

What Is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is almost identical to HTML 4.01 XHTML is a stricter and cleaner version of HTML XHTML is HTML defined as an XML application XHTML is a W3C Recommendation of January 2000. XHTML is supported by all major browsers. زبانهای برنامه سازی وب

Why XHTML? Many pages on the internet contain "bad" HTML. <html> <head> <title>This is bad HTML</title> <body> <h1>Bad HTML <p>This is a paragraph </body> market consists of different browser technologies run on computers, mobile phones or other small devices. Smaller devices often lack the resources or power to interpret a "bad“ code زبانهای برنامه سازی وب

Differences from HTML XHTML elements must be properly nested XHTML elements must always be closed XHTML elements must be in lowercase XHTML documents must have one root element زبانهای برنامه سازی وب

XHTML Syntax XHTML Elements Must Be Properly Nested In XHTML, all elements must be properly nested within each other, like this: <b><i>This text is bold and italic</i></b> زبانهای برنامه سازی وب

XHTML Syntax Non-empty elements must have a closing tag. This is wrong: <p>This is a paragraph <p>This is another paragraph This is correct: <p>This is a paragraph</p> <p>This is another paragraph</p> Empty Elements Must Also Be Closed A break: <br /> A horizontal rule: <hr /> An image: <img src="happy.gif" alt="Happy face" /> زبانهای برنامه سازی وب

XHTML Syntax XHTML Elements Must Be In Lower Case Tag names and attributes must be in lower case. This is wrong: <BODY> <P>This is a paragraph</P> </BODY> This is correct: <body> <p>This is a paragraph</p> </body> زبانهای برنامه سازی وب

XHTML Syntax XHTML Documents Must Have One Root Element XHTML elements must be nested within the <html> root element Child elements must be in pairs and correctly nested <html> <head> ... </head> <body> ... </body> </html> زبانهای برنامه سازی وب

XHTML Syntax Attribute Values Must Be Quoted This is wrong: <table width=100%> This is correct: <table width="100%"> زبانهای برنامه سازی وب

XHTML Syntax Attribute Minimization Is Forbidden This is wrong: <input checked> <input readonly> <input disabled> <option selected> <frame noresize> This is correct: <input checked="checked" /> <input readonly="readonly" /> <input disabled="disabled" /> <option selected="selected" /> زبانهای برنامه سازی وب

XHTML Syntax Mandatory XHTML Elements An XHTML document must have a DOCTYPE declaration. The html, head, title, and body elements must also be present. زبانهای برنامه سازی وب

XHTML Doctypes refers to a Document Type Definition (DTD). A DTD specifies the rules for the markup language, so that the browsers render the content correctly. The basic document structure is: <!DOCTYPE ...> <html> <head> <title>... </title> </head> <body> ... </body> </html> زبانهای برنامه سازی وب

An XHTML Example <!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"> <head> <title>Title of document</title> </head> <body> </body> </html> xmlns attribute in <html>, specifies the xml namespace for a document, and is required زبانهای برنامه سازی وب

XHTML Different Doctypes XHTML 1.0 Strict contains all HTML elements and attributes does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> زبانهای برنامه سازی وب

XHTML Different Doctypes XHTML 1.0 Transitional contains all HTML elements and attributes INCLUDING presentational and deprecated elements (like font) Framesets are not allowed The markup must also be written as well-formed XML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> زبانهای برنامه سازی وب

XHTML Different Doctypes XHTML 1.0 Frameset This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> زبانهای برنامه سازی وب

XHTML HowTo 1. Add a <!DOCTYPE> 2. Add an xmlns Attribute Add an XHTML <!DOCTYPE> to the first line of every page: 2. Add an xmlns Attribute Add an xmlns attribute to the html element of every page: <html xmlns="http://www.w3.org/1999/xhtml"> 3. Change Tags And Attribute Names to Lowercase زبانهای برنامه سازی وب

XHTML HowTo 4. Quote All Attribute Values 5. Close all Empty Tags Check every page to see that attribute values are quoted. 5. Close all Empty Tags 6. Validate XHTML With The W3C Validator using this url: http://validator.w3.org/ زبانهای برنامه سازی وب