Escolar Documentos
Profissional Documentos
Cultura Documentos
File extension:
.xhtml
MIME type:
application/xhtml+xml
Type code:
TEXT
Developed by:
W3C
Portability: All new tags that are created and added are
understood by all.
For that reason XHTML, and XML go against the rules which
were laid down by W3C for the purpose of web content and
authoring tools accessible to disabled users.
Why XHTML?
Extensibility
XML documents needs to be well-formed. Under HTML (an
SGML application), any addition of a new group of elements
requires to alter the entire DTD. In an XML-based DTD, all
that is required is that the new set of elements be internally
consistent and well-formed to be added to an existing DTD.
This makes the development and integration of new
collections of elements very easy.
Portability
Now days use of non-desktop devices to access Internet
documents is increasing .75% of Internet access could is
carried out on these alternate platforms. most of these nondesktop devices will not have the computing power of a
desktop computer, they are not designed to hold ill-formed
HTML as current browsers tend to do.These non-desktop
browsers will not display the document if they wont receive
well-formed markup (HTML or XHTML).
While HTML isn't completely lacking those attributes, we're all too
familiar with how painfully slow the evolution has been (relative to
the pace of Internet development), and how hard it it is to make
your pages work on a wide range of browsers and platforms.
XHTML will help to remedy those problems.
with what people did to improve readability of the code typing the
attributes and elements names in uppercase and the values in
lowercase. Attribute values can be any case you want. For example,
the "#ffcc33" value below can also be written as "#FFCC33."
HTML
XHTML
<TD BGCOLOR="#ffcc33">
<td bgcolor="#ffcc33">
XHTML
<p>Be <b>bold!</p></b>
<p>Be <b>bold!</b></p>
XHTML
First paragraph<p>
Second paragraph<p>
<p>First paragraph</p>
<p>Second paragraph</p>
There are tags which contains no content within them, when we feel
there is no important role to play by them, then should delete those
empty tags. <p> tag contains a paragraph, and a <b> tag contains
text to be bolded, a <br> tag is "empty" as it never contains any
content.Other tags like this are <hr> and <img src="valid.gif">
HTML
XHTML
<hr>
<hr />
<br>
<br />
<img
src="valid.gif">
<img
src="valid.gif" />
XHTML
XHTML
<dl compact>
<dl compact="compact">
<ul compact>
<ul compact="compact">
<option ...
selected="selected"> >
(doctype)
<html xmlns="http://www.vyom.co.in/xhtml">
<head>
<title>...</title>
... </head>
<body>... </body>
</html>
Notice the (doctype) and the "xmlns" attribute on the opening
html tag. You should also include a character set meta tag in the
<head> element.
Wrong:
<p>This is our site <em>paragraph.</p></em>
Right:
<p>This is our site <em>paragraph.</em></p>
Wrong:
<PRE>Some preformatted text.</PRE>
Right:
<pre>Some preformatted text.</pre>
Wrong:
<a HREF="http://www.vyom.co.in">
Right:
<a href="http://www.vyom.co.in">
Wrong:
<p>Welcome to vyom.
<p>This is our website
Right:
<p>Welcome to vyom..</p>
<p>This is our website.</p>
Elements which dont have closing tags must be closed with slash
inside the tag.
<br> becomes <br />
<hr> becomes <hr />
<input type="text">becomes <input type="text" />
Wrong:
<a href=http://www.vyom.co.in>example link</a>
Right:
<a href="http://www.vyom.co.in">example link</a>
Wrong:
<input type="checkbox" checked />
Right:
<input type="checkbox" checked="checked" />
Wrong:
<img src="kitten.jpg" />
Right:
<img src="kitten.jpg" alt="an evil kitten" />
The "id" attribute and the "name" attributeElement ids which should be uniqe eventually will replace
element names.For now, to ensure backword-compatibility it
is recommended to use both,for example, many of the form
fields are accessed by their names. In cascading style sheets
and various scripting languages Ids are used .
elements
Strict
<!DOCTYPE html
PUBLIC "-//VYOM//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/strict.dtd">
Transitional
<!DOCTYPE html
PUBLIC "-//VYOM//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
Frameset
<!DOCTYPE html
PUBLIC "-//VYOM//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/frameset.dtd">
XHTML Elements
XHTML Tags
Sometimes XHTML elements are referred to as "tags". though many
prefer "tag" strictly to the semantic structures to delimit the start
and end of an element.
The first tag is called the start tag, and the second tag
is the end tag
The text that lies between the start and the end tags is
called element content
and >
The text that lies between the start tag and the end
tag is called the element content
Tag
Description
DTD
<!--...-->
Defines a comment
STF
<!DOCTYPE>
STF
<a>
Defines an anchor
STF
<abbr>
Defines an abbreviation
STF
<acronym>
Defines an acronym
STF
<address>
STF
<applet>
TF
<area>
STF
<b>
STF
<base>
<basefont>
TF
<bdo>
STF
<big>
STF
<blockquote>
STF
<body>
STF
<br>
STF
<button>
STF
<caption>
STF
<center>
TF
<cite>
Defines a citation
STF
<code>
STF
<col>
STF
<colgroup>
STF
<dd>
STF
<del>
STF
<dir>
TF
<div>
STF
<dfn>
STF
<dl>
STF
<dt>
STF
<em>
STF
<fieldset>
Defines a fieldset
STF
<font>
<form>
Defines a form
STF
<frame>
<frameset>
STF
<head>
STF
<hr>
STF
<html>
STF
<i>
STF
<iframe>
TF
<img>
Defines an image
STF
<input>
STF
<ins>
STF
<isindex>
TF
<kbd>
STF
<label>
STF
<legend>
STF
<li>
STF
<link>
STF
<map>
STF
<menu>
TF
<meta>
STF
<noframes>
TF
<noscript>
STF
<object>
STF
<ol>
STF
<optgroup>
STF
<option>
STF
<p>
Defines a paragraph
STF
<param>
STF
<pre>
STF
<q>
STF
<s>
TF
<samp>
STF
<script>
Defines a script
STF
<select>
STF
<small>
STF
<span>
STF
<strike>
TF
<strong>
STF
<style>
STF
<sub>
STF
<sup>
STF
<table>
Defines a table
STF
<tbody>
STF
<td>
STF
<textarea>
STF
<tfoot>
STF
<th>
STF
<thead>
STF
<title>
STF
<tr>
STF
<tt>
STF
<u>
TF
<ul>
STF
<var>
Defines a variable
STF
<xmp>
same.
Universal/Core Attributes
Including the <body> tags, almost all tags that come in the
body are held under this category. These are informational, or
they associate the element with information which is
elsewhere in the document.
Events
Based on the user actions or browser these are used to invoke
scripts. For example using onmouseover attribute to create
rollover effects in a document. They are used in JavaScript
extensively,
Tag-Specific Attributes
Attributes which are concerned to a given tag or group of tags
are called Tag-specific attributes. Certain tags like <img> tag,
does not hold any meaning without attributes. Therefore we
do discuss these attributes in relation to the tags they apply
to.
XHTML Validation
With DTD how to Validate
XHTML
An XHTML document is validated against a Document Type
Definition (DTD). A proper DTD must be added as the first
line of the file,before validating properly an XHTML file.
The Frameset DTD includes frames and all the other things which
are included in transitional DTD:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1strict.dtd" >
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html>
XHTML Modularization Model
To develop any complex type of application it is very
important to follow a clear conceptual standard for
organizing the development. To reduce the application's
functionality into some number of "building blocks" or
"modules"we can use the Modular approach. Then some
specific rules are followed to combine these modules to form
an entire application. This approach is very easy and is more
advantageous than any other approaches
Why Modularization is
required?
Design
Goals
Here are the design goals for modularization framework for XHTML:
Description
Entity Number
space
 
exclamation mark
!
"
quotation mark
"
number sign
#
dollar sign
$
percent sign
%
&
ampersand
&
'
apostrophe
'
left parenthesis
(
right parenthesis
)
asterisk
*
plus sign
+
comma
,
hyphen
-
period
.
slash
/
digit 0
0
digit 1
1
digit 2
2
digit 3
3
digit 4
4
digit 5
5
digit 6
6
digit 7
7
digit 8
8
digit 9
9
colon
:
semicolon
;
<
less-than
<
equals-to
=
>
greater-than
>
question mark
?
at sign
@
uppercase A
A
uppercase B
B
uppercase C
C
uppercase D
D
uppercase E
E
uppercase F
F
uppercase G
G
uppercase H
H
uppercase I
I
uppercase J
J
uppercase K
K
uppercase L
L
uppercase M
M
uppercase N
N
uppercase O
O
uppercase P
P
uppercase Q
Q
uppercase R
R
uppercase S
S
uppercase T
T
uppercase U
U
uppercase V
V
uppercase W
W
uppercase X
X
uppercase Y
Y
uppercase Z
Z
[
backslash
\
]
caret
^
underscore
_
grave accent
`
lowercase a
a
lowercase b
b
lowercase c
c
lowercase d
d
lowercase e
e
lowercase f
f
lowercase g
g
lowercase h
h
lowercase i
i
lowercase j
j
lowercase k
k
lowercase l
l
lowercase m
m
lowercase n
n
lowercase o
o
lowercase p
p
lowercase q
q
lowercase r
r
lowercase s
s
lowercase t
t
lowercase u
u
lowercase v
v
lowercase w
w
lowercase x
x
lowercase y
y
lowercase z
z
{
vertical bar
|
}
tilde
~
Description
Entity Number
NUL
null character
�
SOH
start of header

STX
start of text

ETX
end of text

EOT
end of transmission

ENQ
enquiry

ACK
acknowledge

BEL
bell (ring)

BS
backspace

HT
horizontal tab
	
LF
line feed
VT
vertical tab

FF
form feed

CR
carriage return
SO
shift out

SI
shift in

DLE

DC1
device control 1

DC2
device control 2

DC3
device control 3

DC4
device control 4

NAK
negative acknowledge

SYN
synchronize

ETB

CAN
cancel

EM
end of medium

SUB
substitute

ESC
escape

FS
file separator

GS
group separator

RS
record separator

US
unit separator

DEL
delete (rubout)

Entity Name
Entity Number
"
quotation
mark
"
"
'
apostrophe
'
&
ampersand
&
&
<
less-than
<
<
>
greater-than
>
>
Result Description
non-breaking space
 
inverted exclamation
mark
¡
¡
currency
¤
¤
cent
¢
¢
pound
£
£
yen
¥
¥
¦
¦
section
§
§
spacing diaeresis
¨
¨
copyright
©
©
ª
ª
«
«
negation
¬
¬
soft hyphen
­
­
registered trademark
®
®
trademark
™
™
spacing macron
¯
¯
degree
°
°
plus-or-minus
±
±
superscript 2
²
²
superscript 3
³
³
spacing acute
´
´
micro
µ
µ
paragraph
¶
¶
middle dot
·
·
spacing cedilla
¸
¸
superscript 1
¹
¹
masculine ordinal
indicator
º
º
»
»
fraction 1/4
¼
¼
fraction 1/2
½
½
fraction 3/4
¾
¾
¿
¿
multiplication
×
×
division
÷
÷
Entity Name
Entity Number
À
À
Á
Á
capital a, circumflex
accent
Â
Â
capital a, tilde
Ã
Ã
Ä
Ä
capital a, ring
Å
Å
capital ae
Æ
Æ
capital c, cedilla
Ç
Ç
È
È
É
É
capital e, circumflex
accent
Ê
Ê
Ë
Ë
Ì
Ì
Í
Í
capital i, circumflex
accent
Î
Î
Ï
Ï
Ð
Ð
capital n, tilde
Ñ
Ñ
Ò
Ò
Ó
Ó
capital o, circumflex
accent
Ô
Ô
capital o, tilde
Õ
Õ
Ö
Ö
capital o, slash
Ø
Ø
Ù
Ù
Ú
Ú
capital u, circumflex
accent
Û
Û
Ü
Ü
Ý
Ý
Þ
Þ
ß
ß
à
à
á
á
small a, circumflex
accent
â
â
small a, tilde
ã
ã
ä
ä
small a, ring
å
å
small ae
æ
æ
small c, cedilla
ç
ç
è
è
é
é
small e, circumflex
accent
ê
ê
ë
ë
ì
ì
í
í
î
ï
ï
ð
ð
small n, tilde
ñ
ñ
ò
ò
ó
ó
small o, circumflex
accent
ô
ô
small o, tilde
õ
õ
ö
ö
small o, slash
ø
ø
ù
ù
ú
ú
small u, circumflex
accent
û
û
ü
ü
ý
ý
þ
þ
ÿ
ÿ
Entity
Name
Entity
Number
capital ligature OE
Œ
Œ
small ligature oe
œ
œ
Š
Š
š
š
Ÿ
Ÿ
ˆ
ˆ
small tilde
˜
˜
en space
 
 
em space
 
 
thin space
 
 
‌
‌
‍
‍
left-to-right mark
‎
‎
right-to-left mark
‏
‏
en dash
–
–
em dash
—
—
‘
‘
’
’
‚
‚
“
“
”
”
„
„
dagger
†
†
double dagger
‡
‡
horizontal ellipsis
…
…
per mille
‰
‰
‹
‹
›
›
euro
ASCII
Value
URLencode
ASCII
Value
URLencode
ASCII
Value
URLencode
%00
%30
%60
%01
%31
%61
%02
%32
%62
%03
%33
%63
%04
%34
%64
%05
%35
%65
%06
%36
%66
%07
%37
%67
backspace %08
%38
%68
tab
%09
%39
%69
linefeed
%0a
%3a
%6a
%0b
%3b
%6b
%0c
<
%3c
%6c
%0d
%3d
%6d
%0e
>
%3e
%6e
%0f
%3f
%6f
%10
%40
%70
%11
%41
%71
%12
%42
%72
%13
%43
%73
%14
%44
%74
%15
%45
%75
%16
%46
%76
%17
%47
%77
%18
%48
%78
%19
%49
%79
%1a
%4a
%7a
%1b
%4b
%7b
%1c
%4c
%7c
c return
%1d
%4d
%7d
%1e
%4e
%7e
%1f
%4f
space
%20
%50
%21
%51
"
%22
%52
%82
%23
%53
%83
%24
%54
%84
%25
%55
%85
&
%26
%56
%86
'
%27
%57
%87
%28
%58
%88
%29
%59
%89
%2a
%5a
%8a
%2b
%5b
%8b
%2c
%5c
%8c
%2d
%5d
%2e
%5e
%2f
%5f
%7f
%80
%81
%8d
%8e
%8f
URLencode
ASCII
Value
URLencode
ASCII
Value
URLencode
%90
%c0
%f0
%91
%c1
%f1
%92
%c2
%f2
%93
%c3
%f3
%94
%c4
%f4
%95
%c5
%f5
%96
%c6
%f6
%97
%c7
%f7
%98
%c8
%f8
%99
%c9
%f9
%9a
%ca
%fa
%9b
%cb
%fb
%9c
%cc
%fc
%9d
%cd
%fd
%9e
%ce
%fe
%9f
%cf
%ff
%a0
%d0
%a1
%d1
%a2
%d2
%a3
%d3
%a4
%d4
%a5
%d5
%a6
%d6
%a7
%a8
%d8
%a9
%d9
%aa
%da
%ab
%db
%ac
%dc
%ad
%dd
%ae
%de
%af
%df
%b0
%e0
%b1
%e1
%d7
%b2
%e2
%b3
%e3
%b4
%e4
%b5
%e5
%b6
%e6
%b7
%e7
%b8
%e8
%b9
%e9
%ba
%ea
%bb
%eb
%bc
%ec
%bd
%ed
%be
%ee
%bf
%ef
1xx: Information
Message:
Description:
100 Continue
2xx: Successful
Message:
Description:
200 OK
The request is OK
201 Created
202 Accepted
203 Non-authoritative
Information
204 No Content
205 Reset Content
206 Partial Content
3xx: Redirection
Message:
Description:
302 Found
Description:
401 Unauthorized
403 Forbidden
409 Conflict
410 Gone
416
417 Expectation Failed
Description:
Due to an unexpected condition, The
request was not completed.
The functionality required was not
supported by the server. The request
was not completed.
The request was not completed. The
server received an invalid response from
the upstream server
The server is temporarily overloading or
down, Therefore the request was not
completed.
The gateway has timed out
The "http protocol"version is not
supported by the server
Window Events
These are valid only in body and frameset elements
Attribute
Value
Description
onload
script
onunload
script
Value
Description
onchange
script
onsubmit
script
onreset
script
onselect
script
onblur
script
onfocus
script
Keyboard Events
Not valid in base, bdo, br, frame, frameset, head, html, iframe,
meta, param, script, style, and title elements.
Attribute
Value
Description
onkeydown
script
onkeypress
script
onkeyup
script
Mouse Events
These are not valid in base, bdo, br, frame, frameset, head, html,
iframe, meta, param, script, style, and title elements.
Attribute
Value
Description
onclick
script
ondblclick
script
onmousedown
script
onmousemove
script
onmouseover
script
onmouseout
script
onmouseup
script
XHTML Summary
By this tutorial we have learnt to create clean and stricter
HTMl pages
In this tutorial we have learnt that all XHTML elements must
be properly nested, XHTML documents must be well-formed,
Standard Attributes
XHTML Tags