<UL> <LI> tag issue in firefox
When I am aligning items vertically using <ul>
& <li>
tag, the following issue occurs
My code is as follows :
< ul>
< li>
yahoo
< /li>
< li>
google
< /li>
< ul>
I'm getting yahoo google listed horizontally in Firefox...but in IE am abl开发者_如何学Ce to get it vertically.
Plz help :)
You did not properly close your ul
tag. You're missing a /
. It should be:
</ul>
<ul> <!-- Begins an unordered-list -->
<li>Yahoo</li>
<li>Google</li>
</ul> <!-- Ends an unordered-list -->
Do not stick spaces before the tagname. For example, it should be <ul>
, not < ul>
.
Your html is not correct - ul tag is not closed.
Once you've fixed that both browsers will show what you wanted.
精彩评论