How to link two html pages? If we use <a> then what do wr give value to href?

Recommended Answers

All 3 Replies

I know how to use the <a> tag but my doubt is what url should I put in href.For ex i have an html file abc.html and i have another file fgh.html then how do i link the two ?

What do you mean by link here? You can given only one value to href attribute. for two links you need 2 <a> tags.

if you want to open abc from fgh and fgh from abc, then you may place such links in that pages also

1)index.html

<a href=abc.html>abc</a>
<a href=fgh.html>fgh</a>

2) abc.html

.
.
<a href=fgh.html>go to fgh</a>
.
.

3) fgh.html

.
.
<a href=abc.html>go to abc</a>
.
.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.