Professional Documents
Culture Documents
XHTML
Editing XHTML
3
XHTML documents
Source-code
form
Text editor (e.g. Notepad)
.html or .htm file-name extension
Web server
Stores
Web
XHTML documents
browser
Requests
XHTML documents
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
12
13
14
15
<body>
main.html
(1 of 1)
<p>Welcome to XHTML!</p>
</body>
16 </html>
Tag
5
Opening Tag
ClosingTag
XHTML comments
Start
Paragraph
<p>
Nesting of tags
8
Correct:
Wrong:
Element
Tag
Property
Attribute
a documents syntax
URL
Headers
15
through h6
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
12
13
<body>
14
15
<h1>Level 1 Header</h1>
16
<h2>Level 2 header</h2>
17
<h3>Level 3 header</h3>
18
<h4>Level 4 header</h4>
19
<h5>Level 5 header</h5>
20
<h6>Level 6 header</h6>
21
22
</body>
23 </html>
16
17
Images
18
Alt attribute
Images: example
19
1
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
12
13
<body>
14
15
<p>
<img src = "xmlhtp.jpg" height = "238" width = "183"
16
17
18
19
20
</p>
21
</body>
22 </html>
Images: example
20
1
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
12
13
<body>
14
15
<p>
<img src = "xmlhtp.jpg" height = "238" width = "183"
16
17
18
19
20
</p>
21
</body>
22 </html>
Images: example
21
Linking
22
Hyperlink
References
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
23
-->
7
8
9
10
11
12
13
<body>
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</body>
29 </html>
24
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
25
-->
7
8
9
10
11
12
13
<body>
14
15
<p>
16
My email address is
17
18
19
</a>
20
21
22
</p>
23
</body>
24 </html>
26
Image as a hyperlink
27
Nested tags.
<a> <img ..../> </a>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
</title>
12
</head>
13
14
<body>
15
16
17
18
19
20
<p>
<a href = "links.html">
<img src = "buttons/links.jpg" width = "65"
height = "50" alt = "Links Page" />
</a><br />
21
22
23
24
25
28
26
<a href = "contact.html">
27
28
29
</a><br />
30
31
32
33
34
</a><br />
35
36
37
38
39
</a><br />
40
41
42
43
44
</a><br />
45
46
</p>
47
48
</body>
49 </html>
29
30
31
sup
Superscript text
sub
Strikethrough text:
Subscript text
<hr />
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
</title>
12
</head>
13
14
<body>
15
16
17
18
<p>
-->
19
Click
20
21
22
deitel@deitel.com.
23
</p>
24
25
32
26
27
28
29
30
-->
31
-->
32
-->
33
34
35
36
37
38
39
40
41
</body>
42 </html>
33
34
Unordered Lists
35
in an unordered list
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
12
13
<body>
14
15
16
17
18
19
20
<ul>
21
22
23
24
25
36
26
<li><a href = "http://www.yahoo.com">Yahoo!</a></li>
27
28
29
</ul>
30
31
</body>
32 </html>
37
number
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
5
-->
7
8
9
10
11
12
13
<body>
14
15
16
17
18
<ul>
19
20
21
22
23
39
24
25
26
27
<ul>
28
<li>New games</li>
29
<li>
30
New applications
31
32
33
<ol>
34
<li>For business</li>
35
<li>For pleasure</li>
36
37
</ol>
</li>
38
39
40
<li>Search engines</li>
41
<li>Shopping</li>
42
<li>
43
Programming
44
40
45
46
<ol>
47
<li>XML</li>
48
<li>Java</li>
-->
49
<li>XHTML</li>
50
<li>Scripts</li>
51
<li>New languages</li>
</ol>
52
53
</li>
54
55
56
</li>
57
58
59
<li>Links</li>
60
61
62
63
</ul>
64
65
</body>
66 </html>
41
42
Lists
43
type attribute:
Ordered
list:
1:
1, 2, 3, ..
a: a, b, c, ..
A: A, B, C, ..
i: i, ii, iii, ..
I: I, II, III, ..
Unordered
Circle
square
disc
list:
o gg
gg
gg
Special characters
45
Organizational Tags
46