Reputation: 321
I was working on adding links in HTML. But when I click on the text, it is not clickable. It was just like before adding link. Please help!
<h2><font color = "red" face = "RDR Lino"><a href = "file:///G:/HTML/Project_HTML/info.html"><u>Weapons</font></u></a></h2>
<p> Have a look at the most detailed weapons at the ammunition. </p>
<center><img src="G:\HTML\Images\rdr2_1.png" alt="Weapons" height="5%" width="70%"/></center>
info.html code (saved in same folder as that of above html file):-
<!DOCTYPE html>
<html>
<head>
<title> Information </title>
</head>
<body>
<h1> World of Red Dead Redemption II</h1>
</body>
</html>
Upvotes: 0
Views: 583
Reputation: 60
<h2><font color = "red" face = "RDR Lino"><a href = "file:///G:/HTML/Project_HTML/info.html"><u>Weapons</font></u></a></h2>
the closing tags are in the wrong order. Its suppose to be:
<h2><font color = "red" face = "RDR Lino"><a href = "file:///G:/HTML/Project_HTML/info.html"><u>Weapons</u></a></font></h2>
Edit: What I also see is the href. Since they both are in the same folder, the like can href can be
<a href = "info.html">
Upvotes: 1
Reputation: 141
The direction of your slashes is wrong in your href = "file:///G:/HTML/Project_HTML/info.html"
Use this instead:
href="file:\\\G:\HTML\Project_HTML\info.html"
You may also have one too many slashes so it should maybe be:
href="file:\\G:\HTML\Project_HTML\info.html"
Note that when you end up publishing this on the web, you'll need to remove file:
and G:
completely. It would be better if you used relative URLs, at least when you're done testing, especially since no-one will have access to your local file system.
Also, check the order of your tags. They should be outer first, then inner, then inner closing tag, then outer closing tag. Like this:
<u><b>words</b></u>
Even better would be to learn CSS attributes or styles and use a <span>
or other tags than font
.
Upvotes: 1
Reputation: 21
I believe instead of redirecting it to page you could simply write...
Hopefully it helps... thx
Upvotes: 1