Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For right now, either break the list into a block if the list semantics are that important to you, or leave it as a text string like your example and get on with your life.</p> <blockquote> <p>If you don't believe this list is semantically part of the paragraph, please state why you think so,</p> </blockquote> <p>It is. But that's not the problem.</p> <blockquote> <p>[...] an ol cannot be contained inside a p. But why not?</p> </blockquote> <p>Because the spec says so. That's about the end of the discussion.<br> There are plenty of semantic structures that simply don't exist in HTML due to oversights, and this is one of them. There's also, for example, no true way to mark up footnotes, which is strange considering HTML was initially created for sharing things like academic research. (There are some <a href="http://www.w3.org/TR/html5/links.html#footnotes" rel="noreferrer">documented cheats</a>; not the same thing.)<br> Given your links, I'm assuming you've read the <em>technical</em> reasons regarding block elements and whatnot, so I'll skip that here.</p> <blockquote> <p>I'd really like to know how I can write this list using the HTML tags <code>&lt;ol&gt;</code> and <code>&lt;li&gt;</code></p> </blockquote> <p>Well, you could start with <a href="http://www.alistapart.com/articles/customdtd/" rel="noreferrer">creating a custom DTD</a>(even though you <a href="http://www.w3.org/Style/customdtd.en.html" rel="noreferrer">really shouldn't</a> in the great majority of cases) that allows the elements to be nested and then figure out how to actually make the list flow into the paragraph(eg. display:inline etc) in a way that won't make browsers puke. Or maybe specify an entirely new element for in-line lists. Or you could just move on to more important things.</p> <blockquote> <p>these items are part of an ordered list and to include them in the correct element is good for SEO</p> </blockquote> <p>Sometimes when people bring up SEO as a reason for doing things, the answer should be "You're trying too hard and probably have better things to do." This is one of them. Any single thing like this done "for SEO" rarely makes anywhere near as much difference as your offense at not being able to do it makes it become in your mind. The real answer to your question involves <em>changing the HTML spec</em>. If that's the sort of work you enjoy doing, then join the <a href="http://www.whatwg.org/mailing-list#specs" rel="noreferrer">relevant WHATWG mailing list</a>, make your proposal, defend it for probably months on end, and if you get lucky it'll become official.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload