XHTML Basics.

Slides:



Advertisements
Similar presentations
XHTML Basics. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit.
Advertisements

XHTML Basics.
Pengantar Teknologi Mobile 13 Antonius Rachmat C, S.Kom, M.Cs XHTML.
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 1.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
HTML, XHTML, CSS, & JAVAScript ~ an introduction ~
HTML BASICS Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
 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.
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.
Essential Tags Web Design – Sec 3-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Essential Tags Web Design – Sec 3-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
XHTML Instructor: Charles Moen CSCI/CINF XHTML  A stricter version of HTML  Extensible HTML  The XHTML specification is maintained by the World.
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.
HTML Structure & syntax. Introduction This presentation introduces the following: Doctype declaration HTML Tags, Elements and Attributes Sections of a.
Lesson 4.
IT Engineering I Instructor: Rezvan Shiravi
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
Images and Tables ables.asp.
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 
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.
Basic HTML Introduction to HTML.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
CSE 102 Introduction to Web Design and Programming
HTML5 Basics.
CIS 228 The Internet 9/20/11 XHTML 1.0.
Essential Tags Web Design – Sec 3-3
Coding, Testing and Valdating a Web Page
XHTML Basics.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Basic HTML PowerPoint How Hyper Text Markup Language Works
Digital Media Technology Seminar 2 – 20 September 2016
Web Development & Design Foundations with HTML5 8th Edition
Essential Tags Web Design – Sec 3-3
Intro to Web Development Class A Review
Introduction to HTML5.
Basic HTML PowerPoint How Hyper Text Markup Language Works
XHTML Basics.
XHTML
XHTML Basics.
HTML A brief introduction HTML.
Web Design and Development
Introduction There are several good reasons for taking CS142: Web Applications: You will learn a variety of interesting concepts. It may inspire you to.
Introduction to Web Page Design
CS 142 Lecture Notes: Rails Controllers and Views
Instructor: Charles Moen
Your Page and Review Objectives
Note that iframes are available in HTML5.
Intro to Web Development HTML Structure
Introduction to HTML5.
HTML Basics Web.
HTML5 Syntax.
HTML Structure.
XHTML Basics.
Introduction to HTML5.
Basic HTML Workshop.
XHTML Basics.
XHTML 7-May-19.
Dreamweaver.
XHTML Validation.
Introduction to HTML5.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Your Page and Review.
Creating Web Documents
Presentation transcript:

XHTML Basics

What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit of using XHTML is that it helps make web pages look identical in different browsers, such as Internet Explorer, Firefox, Safari, etc. XHTML is used to define and organize the page content but not to format or style it.

A basic XHTML document: <!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>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>

DOCTYPE must be specified on the first line: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> The DOCTYPE tells the web browser which language is being used for the set of instructions that follow. In this class, we will be using XHTML Transitional, which allows us more flexibility than XHTML Strict.

In XHTML, all elements must be in lowercase (the DOCTYPE line is not an element.) <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>

Each element must have a beginning and an end: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>

Elements must be properly nested: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>My First Web Page</title> </head> <body> <p>Hello World</p> </body> </html>

What is wrong with this? <h1>My Favorite Things</h1> <ul> <li>Brown <p> paper packages</li> Tied up with strings</p> </ul>

What is wrong with this? The tags are overlapped. <h1>My Favorite Things</h1> <ul> <li>Brown <p> paper packages</li> Tied up with strings</p> </ul> The tags are overlapped.

White space doesn’t matter White space doesn’t matter. The browser will ignore blank lines and multiple spaces: <ul> <li>First Item</li><li>Second Item</li> </ul> is the same as: <ul> <li>First Item</li> <li>Second Item</li> </ul> We can take advantage of this fact by putting blank lines and indents in our code to make it easier to organize and read.

Summary of XHTML Basics: DOCTYPE must be specified first. All elements must be in lowercase. Each element must have a beginning and an end. Elements must be properly nested. White space doesn’t matter.