anish
anish

Reputation: 11

<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 able to get it vertically.

Plz help :)

Upvotes: 1

Views: 1039

Answers (4)

iDevlop
iDevlop

Reputation: 25262

You did not properly close your ul tag. You're missing a /. It should be:

</ul>

Upvotes: 8

Chuck
Chuck

Reputation: 237060

Do not stick spaces before the tagname. For example, it should be <ul>, not < ul>.

Upvotes: 1

Fedor Hajdu
Fedor Hajdu

Reputation: 4697

Your html is not correct - ul tag is not closed.

Once you've fixed that both browsers will show what you wanted.

Upvotes: 0

Sampson
Sampson

Reputation: 268344

<ul> <!-- Begins an unordered-list -->
  <li>Yahoo</li>
  <li>Google</li>
</ul> <!-- Ends an unordered-list -->

Upvotes: 4

Related Questions