[html5] inline lists - correct markup?

Ian Hickson ian at hixie.ch
Mon Aug 2 18:17:24 PDT 2010


On Tue, 4 May 2010, Eitan Adler wrote:
>
> What is the appropriate way to mark up inline lists?
> Something like:
> "I went to the store and bought eggs, cheese, and milk."
> or
> "I added three things in order to help: blah, deblah, and more blah"
> 
> I could imagine something like
> <style>
> .il {
> display:inline;
> list-style-type:none;
> }
> </style>
> I went to the store and bought <ul class="il"><li class="il">eggs,
> </li><li class="il">cheese, </li><li class="il">and milk.</li></ul>
> which seems a bit much.
> 
> Are <ul> and <ol> not meant to be used in this way?

You can use them that way if you really want, but really I would recommend 
just using:

   <p>I went to the store and bought eggs, cheese, and milk.</p>

   <p>I added three things in order to help: blah, deblah, and more 
   blah.</p>

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the Help mailing list