Forum Moderators: open

Message Too Old, No Replies

Paragraph tags inside anchor tags

Another way to show link

         

Adam5000

4:23 pm on Nov 5, 2006 (gmt 0)

10+ Year Member



In an effort to make the size of the links look bigger on the screen, I put paragraph inside the anchor tags and used an inline style sheet like so.

<a href="page_two.htm"><p style="font-size: 20pt">Page two</p></a>

It works and looks good on the screen with both MSIE and Netscape, but when the validator saw the <p></p> tags between the <a></a> tags it black flagged them.

Is there another way to do this that will validate?

tedster

4:28 pm on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If all you need is larger text, you can just put the style attribute in the anchor tag.

<a href="page_two.htm" style="font-size: 20pt;">Page two</a>

Also note, "pt" is a print unit, and not really a screen unit.

Adam5000

5:44 pm on Nov 5, 2006 (gmt 0)

10+ Year Member



This Page Is Valid HTML 4.0 Transitional!

Yea!

Thank you Tedster and everyone else who helped.

Now I can concentrate on the content.

g1smd

8:21 pm on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Check out what I just said about CSS in another thread here. I think it could help you too: [webmasterworld.com...]

encyclo

9:31 pm on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This Page Is Valid HTML 4.0 Transitional!

Congratulations! However, you shouldn't really be using HTML 4.0 - HTML 4.01 is the latest HTML version which includes fixes for several errors in the original 4.0 specification. See the following thread to help you choose a better doctype:

  • FAQ: Choosing the best doctype for your site [webmasterworld.com]
  •