Hi All,
I was just wondering whether do I need to wrap a tag (a href="#") in a <p>
tag? I guess it can be wrapped in any block level element like div but not sure.
Thanks
Hi All,
I was just wondering whether do I need to wrap a tag (a href="#") in a <p>
tag? I guess it can be wrapped in any block level element like div but not sure.
Thanks
It is an inline element and doesn't have to be wrapped anywhere.
The page body is already a block-level element, so anything you have inside it is respectively wrapped by it.
No. If you want to make the anchor element block level you use the css property display: block;
<a href="http://www.google.com/mail" title="Google Web Mail" style="display: block;">Google Mail</a>
You can wrap an anchor in a p element if you want to do something like:
<p>My favorite search engine is <a href="http://www.google.com" title="Google Search Engine">Google</a>, because it allows me to fine tune my search</p>