<div> element inside the anchor<a> tag, ordered/unordered list tag and etc is correct html format or not.....
<div> element inside the anchor<a> tag, ordered/unordered list tag and etc is correct html format or not.....
Hi there ashokbe
it is not permisible to place...
...within...
coothead
in html4, this is correct. however, it works in all modern browsers (though it is sometimes "buggy" in Internet Explorer), and it is valid in html5.
Technically it should work but why are you putting a div into an anchor? If it is so you can make the anchor have a specific appearance, it may be easier and less buggy to make your list inside a div, then but the style attributes of your <div> apply to the anchor inside the list. For example:
(Style.css)
(index.html)Code:div#yourdiv ul li a { /* Put your properties here */ }
Code:<div id="yourdiv"> <ul> <li><a>Your anchor text here</a></li> </ul> </div>
-JL Griffin
Bookmarks