XHTML The Basics A brief history of HTML SGML (Standard Generalized Markup Language) Then came HTML Followed by the browser…and the great browser wars.

Slides:



Advertisements
Similar presentations
Website Design.
Advertisements

1 HTML Standards & Compliance. 2 Minimum Required HTML tags: (must go in this order!)
XHTML Basics.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 3: XHTML Coding © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page.
XHTML 16-Apr-17.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
WML/HTML and XML Multiplatform Applications. Agenda XML – History and purpose What have HTML, WML and XML got to do with each other Why useful for multiplatform.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Chapter 1 Understanding the Web Design Environment
HTML CS1315 Fall What You Need to Get Started A *simple* text editor to write HTML – Windows: notepad – Mac: textedit (be sure to pick Format 
Creating Web Pages with HTML
Principles of Web Design 6 th Edition Chapter 1 – HTML5.
 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.
HTML (HyperText Markup Language)
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.
Introduction to HTML5. History of HTML HTML first published – Tim Berners-Lee HTML 2.0 HTML 3.2 HTML 4.01 XHTML 1.0 XHTML 2.0.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
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.
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 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.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
Introduction to HTML. What is HTML? Hyper Text Markup Language (HTML) is a language for describing web pages. HTML is not a programming language, it is.
XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Lesson 4.
XHTML By Trevor Adams. Topics Covered XHTML eXtensible HyperText Mark-up Language The beginning – HTML Web Standards Concept and syntax Elements (tags)
ECA 228 Internet/Intranet Design I Intro to Markup.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
1 Web Application Programming Presented by: Mehwish Shafiq.
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.
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
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.
Standards and Compliance. A Brief History of HTML HTML through 1991  Hypertext enabled pages but presentation was lacking HTML 
Validation. What is Validation? Removing errors improves the consistency of how our pages look to a wide variety of browsers and devices. Ensuring that.
XHTML Basics. What is XHTML? XHTML is newer than, but built upon, the original HTML (Hyper Text Markup Language) platform. XHTML has stricter rules and.
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
CS7026: Authoring for Digital Media HTML Authoring
CIS 228 The Internet 9/20/11 XHTML 1.0.
Validation.
XHTML Basics.
Introduction to HTML 5.
Web Programming– UFCFB Lecture 9
Validation.
XHTML Basics.
XHTML
XHTML Basics.
HTML A brief introduction HTML.
Structuring Content in a Web Document
Introduction to HTML 5.
XHTML Basics.
XHTML Basics.
Web Programming– UFCFB Lecture 9
XHTML 7-May-19.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Creating Web Documents
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Presentation transcript:

XHTML The Basics

A brief history of HTML SGML (Standard Generalized Markup Language) Then came HTML Followed by the browser…and the great browser wars –IE –Netscape –Opera –Mozilla –Still others have come and gone

Abandoning the old ways Much of the web is not designed with compatibility in mind Web pages don’t work the same way in every browser –This is usually a result of designers and developers merging style and content in their documents. –Not adhering to standards makes content totally inaccessible in some browsers

Adopting the new ways W3C standards enhance accessibility and promise long- term durability (forward web design). The rules take minutes to learn and the benefits are vast. Tools are available to help. Free online validators help ensure that your XHTML and CSS are error free. One of the main goals of XHTML is to get your documents to the point where they are XML compliant. XHTML will help your sites work better in more browsers and devices, reaching more people.

The Rules and Guidelines Open with proper Doctype. All tags must be lower case. All attributes must be in quotes. All tags must be closed. All empty tags must be closed.

Open with proper Doctype XHTML documents must begin with tags that tell the browser how to interpret them. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " This declaration should be placed at the very top of every XHTML document.

You will also find this tag beneficial

All tags must be lowercase These will not validate as XHTML: Class Presentation body text In XHTML, the tags should read: Class Presentation body text Unlike HTML, all XHTML must be typed in lowercase, or your document will not validate.

All attribute values must be in quotes In HTML, you didn’t need to put quotations around attributes values. In XHTML, they must be quoted. The following is incorrect: The following is valid XHTML

All attribute values must be in quotes Even in cases where the attribute only has one possible argument, you must specify the argument! This is not valid code: text text text This is valid XHTML code: text text text

Another change to be aware of: Another change under XHTML is the use of page anchors. Even though this change will not become standard until versions of XHTML later than 1.0, you should begin including the XHTML tag attributes in order to ensure that your pages are compliant in the future. Later versions of XHTML are going to drop the "name=" attribute in page anchors. Instead, one should use the "id=" attribute to name an anchor that's referenced by a "#" in the URL. Currently, most browsers only understand the "name=" argument, so until the browsers all catch up, simply use both of the attributes in your anchors, like this: Something Else

All tags must be closed XHTML requires that you close all of your tags. It's something that we're used to doing already, but the tricky part comes in when you have to use closing tags that are optional in HTML -- when was the last time you used ? Every open tag in your XHTML document needs to be accompanied by a closing tag. A paragraph in you document cannot look like this: This is a bad paragraph Instead, use a closing tag, like this: This is a good paragraph

More on tags You must remember to close every tag! Every needs a and every needs a. The same goes for all standard HTML tags, even the ones which feel awkward, like and. Fortunately, there is a shortcut for closing these tags that don't usually need to be logically closed. The shortcut is to add a close-command slash at the end of the tag to turn it off.

Tag shortcuts Yes, even the break tag needs to be closed. Use either or you can shortcut it as Even img and other tags must be closed: This rule applies to all tags that you wouldn’t normally close if you were writing HTML 4.01

Your basic Example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " transitional.dtd"> Bare bones XHTML file

XHTML Strict No tables No font tags Remember, XHTML separates presentation from content Bring documents into strict compliance This is the doctype statement to use for Strict:

Tools W3C validator – W3C CSS Validator HTML Tidy (HTML – XHTML Converter –Dos based program. –Windows or Unix (Linux) based. Also MAC. –Download from Homesite –Personal favorite Macromedia Homesite.

References - World Wide Web Consortiumhttp:// - General tutorial and referenceshttp:// - Good articlehttp:// - Good article and linkshttp://

Notes If you use wysiwyg editors like Dreamweaver or Frontpage, you are likely to have errors Hopefully these will be better in the future Use the Validator to work problems out.

Notes Remember that validators are not perfect, just like any other software product.

Notes The infamous white space bug: Each of the two tags below is functionally equivalent, but because of their varying use (or non–use) of white space, they might display differently in a browser that attempts to parse white space in markup. Thus: Might display differently than:

Notes Second example: Might display differently than: