有序列表和子列表问题 HTML

发布于 2024-12-20 06:22:40 字数 1405 浏览 3 评论 0原文

这是我的代码:

      <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>

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

有关瑞典的常见问题。二.

当它应该看起来像:

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

我不知道如何将其放在问题的开头。所有其他列表和子列表都表现良好,但这个列表不知何故搞砸了...... 请帮忙:)

So here is my code:

      <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>

When I then use this code, the first list called, "Frequently asked questions about Sweden" has its roman numeral (the one given to it from the ordered list) on the wrong side of it.
So basically it looks like this:

Frequently asked questions about Sweden. II.

When it should look like:

II. Frequently asked questions about Sweden.

I dont know how to put it at the start of the question. All the other lists and sublists act fine but this one messes up somehow.....
Help please :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

睫毛溺水了 2024-12-27 06:22:40

这是你想要的吗?

  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>

Is this what you wanted?

  1. Frequently asked questions about Sweden
    • What and where is Sweden?
    • When did Sweden stop participating in wars?
    • Is Sweden a part of the European Union?
    • Did Sweden ever have a scientific revoution?
    • Did the Nobel Prize really come from Sweden?
  2. More Questions

    • Does Sweden hold many patents on their inventions?
    • How does the Swedish educational system work?
    • How is school financed in Sweden?

<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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文