Introduction To XHTML Part 1
Introduction To XHTML Part 1
Introduction to XHTML
Part 1 of 2
pejal71@gmail.com
Objectives
identify
important components of XHTML
document
2 of 17
Agenda
Whatis XHTML?
XHTML is a Web Standard
Why XHTML?
XHTML vs. HTML
XHTML syntax (intro - part 1)
3 of 17
What is XHTML?
4 of 17
XHTML is a Web standard
5 of 17
Why XHTML?
<html>
<head>
<title>This is bad HTML </title>
<body>
<h1>Bad HTML
</body>
6 of 17
Why XHTML?
7 of 17
Differences between XHTML & HTML?
8 of 17
XHTML Documents must be
properly nested
inHTML, some elements can be improperly
nested within each other like this:
9 of 17
XHTML Documents must be
well-formed
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 elements.
below is the basic document structure:
<html>
<head>. . . </head>
<body>. . . </body>
</html>
10 of 17
Tag Names Must Be in Lower Case
11 of 17
ALL XHTML Elements
Must Be Closed
non-empty elements must have an end tag
empty elements must also be closed
12 of 17
XHTML Basic Syntax
13 of 17
XHTML Basic Syntax
14 of 17
XHTML <!DOCTYPE>
15 of 17
More XHTML Tags:
comment ...
more tags in the
header next class
paragraph homework: write an
break
XHTML document
about yourself. you
horizontal bar can include your
bold, italic, font photo, strengths,
list weaknesses, email
link address etc. save your
images
document as
your_id.html
16 of 17
Resources
XHTML Tutorial
http://www.w3schools.com/tags/default.asp
The W3C Markup Validaton Service
http://validator.w3.org/
17 of 17