HTML and CSS Reference
In-Depth Information
To Add Links to Link Targets Within a Web Page
The next step is to add link targets using the code shown in Table 3-10.
Table 3-10 HTML Code to Insert Bulleted List with Links to Link Targets
Line
HTML Tag and Text
47
<ul style="list-style-type: square">
48
<li><a href="#fish">Frog Fish</a></li>
49
<li><a href="#lobster">Colorful Lobster</a></li>
50
</ul>
The following step shows how to add the code to create an unordered (bulleted) list and
then to use the list items as links to link targets within the Web page.
1
Highlight the line
<!--Insert unordered list
here --> on line 47.
Type the HTML code in
Table 3-10 but do not
press the e n t e r key at the
end of line 50.
This HTML code inserts
the bulleted list that
provides links to the two
targets (fish and lobster)
inserted above.
link to href target
with id fish from this
bulleted text
inserted bulleted list to
targets fish and lobster
starting on line 47
Do I have to
use a bulleted
list for the
links?
No, you can use any
text for the links to the
targets created in the
step above. The bulleted
list makes the links easy
to see and keeps the
links in one area of the
Web page.
target with
id fish
Figure 3-43
Search WWH ::




Custom Search