You are on page 1of 11

1

INTRODUCTION TO
XHTML-III

Topics
2

Internal links.
Meta elements.

Internal Linking
3

Enables the user to jump between locations in


the same document.
Useful for long documents that contain many
sections. Users do not have to scroll through
the entire document to find a specific section.
Attributes:
id attribute, Example: id =ID.
Then <a href=#ID>
Using

Internal Linking: Example


4

<?xml version = "1.0"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

4
5

<!-- Fig. 5.6: links.html -->

<!-- Internal Linking

-->

7
8
9
10
11

<html xmlns = "http://www.w3.org/1999/xhtml">


<head>
<title>Internet and WWW How to Program - List</title>
</head>

12
13

<body>

14
15

<!-- id attribute creates an internal hyperlink destination -->

16

<h1 id = "features">The Best Features of the Internet</h1>

17

LINKS.HTML
(1 OF 3)

18

<!-- an internal link's address is "#id" -->

19

<p><a href = "#bugs">Go to <em>Favorite Bugs</em></a></p>

20
21
22
23

<ul>

<li>You can meet people from countries


around the world.</li>

24
25

<li>You have access to new media as it becomes public:

26

<ul>

27

<li>New games</li>

28

<li>New applications
<ul>

29
30

<li>For Business</li>

31

<li>For Pleasure</li>
</ul>

32

</li>

33
34
35

<li>Around the clock news</li>

36

<li>Search Engines</li>

37

<li>Shopping</li>

38

<li>Programming
<ul>

39
40

<li>XHTML</li>

41

<li>Java</li>

42

<li>Dynamic HTML</li>
<li>New languages</li>

44

</ul>

45

</li>

46
47
48

LINKS.HTML
(2 OF 3)
<li>Scripts</li>

43

</ul>
</li>

49
50

<li>Links</li>

<li>Keeping in touch with old friends</li>

<li>It is the technology of the future!</li>

</ul>

<!-- id attribute creates an internal hyperlink destination -->

<h1 id = "bugs">My 3 Favorite Bugs</h1>

<p>

<!-- internal hyperlink to features -->

<a href = "#features">Go to <em>Favorite Features</em>

</a></p>

<ol>

<li>Fire Fly</li>

<li>Gal Ant</li>

<li>Roman Tic</li>

</ol>

</body>

1 </html>

LINKS.HTML
(3 OF 3)

Internal Linking (self-study)


8

A hyperlink can specify an internal link in


another document.

Example: link to a named anchor called


booklist in books.html:
href=books.html#booklist.

Extra Slide (self-study)


9

<a href = page.html target = ...>

Target=
_blank:

new browser window,


_self: the same frame,
_top: full browser window, remove the frameset,
The name of the frame.

Meta Elements
10

Meta Elements
11

Metadata is data (information) about data.


The <meta> tag provides metadata about the
HTML document. Metadata will not be
displayed on the page.
Meta elements are typically used to specify
page description, keywords, author of the
document, last modified, and other metadata.
<meta> tags always goes inside the <head>
element.

You might also like