html - 有序列表和子列表问题 HTML

标签 html nested-lists html-lists

这是我的代码:

      <div class="faq">
      <br />
<ol>
<li>Frequently asked questions about Sweden</li>
<li><a href="#faq1">What and where is Sweden?</a>
<ul>
    <li><a href="#faq2">When did Sweden stop participating in wars?</a></li>
    <li><a href="#faq3">Is Sweden a part of the European Union?</a>
         <ul>
            <li><a href="#faq4">Did Sweden ever have a scientific revoution?</a></li>
            <li><a href="#faq5">Did the Nobel Prize really come from Sweden?</a></li>
         </ul>
       </li>
    </ul>
  </li>
</ol>
<ol>
    <li>More Questions
        <ul>
            <li><a href="#faq6">Does Sweden hold many patents on their inventions?</a></li>
            <li><a href="#faq7">How does the Swedish educational system work?</a></li>
            <li><a href="#faq8">How is school financed in Sweden?</a></li>
        </ul>
        </li>
    </ol>

然后当我使用此代码时,第一个名为“关于瑞典的常见问题解答”的列表在错误的一侧有罗马数字(从有序列表中给它的那个)。 所以基本上它看起来像这样:

关于瑞典的常见问题。二、

什么时候应该看起来像:

二。关于瑞典的常见问题。

我不知道如何把它放在问题的开头。所有其他列表和子列表都运行良好,但这个列表不知何故搞砸了…… 请帮助:)

最佳答案

这是你想要的吗?

  1. 关于瑞典的常见问题
    • 瑞典是什么地方?

    • 瑞典什么时候停止参战的?

    • 瑞典是欧盟的一部分吗?

    • 瑞典有过科学革命吗?

    • 诺贝尔奖真的来自瑞典吗?

  2. 更多问题

    • 瑞典是否拥有许多发明专利?

    • 瑞典的教育体系是如何运作的?

    • 瑞典的学校如何筹资?


<html>
<head>
</Head>
<body>
<ol> 
    <li>Frequently asked questions about Sweden</li> 
<ul>
    <li><a href="#faq1">What and where is Sweden?</a></li>     
    <li><a href="#faq2">When did Sweden stop participating in wars?</a></li>     
    <li><a href="#faq3">Is Sweden a part of the European Union?</a></li>            
    <li><a href="#faq4">Did Sweden ever have a scientific revoution?</a></li>             
    <li><a href="#faq5">Did the Nobel Prize really come from Sweden?</a></li>  
</ul>
    <li>More Questions         
<ul>             
    <li><a href="#faq6">Does Sweden hold many patents on their inventions?</a></li>             
    <li><a href="#faq7">How does the Swedish educational system work?</a></li>             
    <li><a href="#faq8">How is school financed in Sweden?</a></li>         
</ul>            
</ol>
</body>
</html>

关于html - 有序列表和子列表问题 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8407236/

相关文章:

html - 将 div 的元素放在 css 框中

html - 元素文本内容在水平排列的混合内联元素中不可见

html - 带有 ul : prevent drop down from overflowing menu container 的 WordPress 菜单

jquery - 为什么 Modal Popup with Jekyll 和 bootstrap 只显示最后一个 child 的内容?

html - 如何在没有间距的情况下进行多跨度推特 Bootstrap

python - 从嵌套列表构造 pandas 数据框

python - 通过多个维度索引列表的方法

html - 使用无序列表创建表单?

javascript - 按钮点击只有效一次

java - 比较父列表结构中的嵌套列表以获取java中特定索引中的值