Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This <a href="http://sscce.org" rel="noreferrer">SSCCE</a> works fine in all browsers from IE6 and up (IE6/7/8, FF2/3, Safari3, Chrome4, Opera9).</p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;title&gt;SO question 2401705&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;ol&gt; &lt;li&gt;Item 1 &lt;li&gt;Item 2 &lt;/ol&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>It even works when I tried to replace the <code>&lt;/ol&gt;</code> by the syntactically invalid <code>&lt;ol&gt;</code>. So, your problem lies somewhere else. You really need to elaborate the "Doesn't work" in <em>more detail</em>. What exactly happens? What exactly happens <em>not</em>? Preferably edit your question to include an SSCCE (like above) and try to ask the question the <a href="http://catb.org/esr/faqs/smart-questions.html" rel="noreferrer">smart way</a>. </p> <p>Note, in contrary to what others say, a non-closing <code>&lt;li&gt;</code> is syntactically valid in normal HTML. It's indeed invalid in XHTML, but I don't see any reason to use XHTML unless you're using a component based MVC framework or some other XML based tool to generate HTML pages.</p> <p><strong>Update</strong>: you thus don't see the numbers. Apparently you've set the <code>margin</code> of the <code>ol</code> to zero. This way they will get out of the view. The following SSCCE demonstrates it. It indeed fails in IE6/7.</p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;title&gt;SO question 2401705 - IE6/7 problem&lt;/title&gt; &lt;style&gt;ol { margin: 0; }&lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;ol&gt; &lt;li&gt;Item 1 &lt;li&gt;Item 2 &lt;/ol&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Don't set the margin to 0. This may also be caused by a so-called CSS reset sheet. Don't use them, just remember to specify the margins for all block elements yourself.</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