Reputation: 71
I have several lines that I need to be a link all together. I wrote this code. It is considered as a link by the browser but it is not clickable? Am I doing this wrong?
<div class="padding-title">
<a herf="index.html">
<p class="small"><font face="courier" size="4">
<h1>line1</h1>
</font>
</p>
<p class="small2"><font face="courier" size="4">
line2<br>
line3<br>
line4
</font>
</p>
</a>
</div>
Upvotes: 0
Views: 47
Reputation: 60563
1st <font>
is deprecated, so don't use it, then to make the a
clickable you need the href
, which you have it but with a typo.
<div class="padding-title">
<a href="index.html">
<h1>line1</h1>
<p class="small2">
line2
<br />line3
<br />line4
</p>
</a>
</div>
Upvotes: 2
Reputation: 833
You're correct that the a
tag should wrap the p
tags if you want them all to link to one place.
But you misspelled the a
tag's "href" attribute and wrote "herf" instead. Make sure you read your code!
Upvotes: 2