html - 为什么下面提到的代码无法区分 <hr3> 标题和普通文本?

标签 html css

我正在尝试使用 HTML 创建我的第一个网页。我正在使用以下代码:

<h3>Education: </hr3>
    <ul>
        <li> Bachelor's of Engineering in Electrical Engineering.</li>
        <li> Completed 12th standard. </li>
        <li> Completed 10th standard. </li>
    </ul>

但是这段代码无法区分标题“Education”和无序列表。

完整的文本仅在标题下。

<h3>Education: </hr3>
    <ul>
        <li> Bachelor's of Engineering in Electrical Engineering.</li>
        <li> Completed 12th standard. </li>
        <li> Completed 10th standard. </li>
    </ul>

教育应该在h3标题中,无序列表应该是纯文本。

最佳答案

标题的结束标记需要与标题的开始标记匹配——否则它不会停止开始标记的效果。简而言之:

<h3>Education: </hr3>

应该是

<h3>Education: </h3>

关于html - 为什么下面提到的代码无法区分 <hr3> 标题和普通文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58385928/

相关文章:

javascript - 为什么此按钮元素与 div 具有不同的 'click' 行为?

button - 设置边框半径时,按钮中会出现额外的线条

css - fancybox 的样式表路径在 Wordpress NextGEN 画廊插件中不正确

javascript - 拖放不适用于一个 div

css - 如何制作像 WikiHow 一样的导航栏?继续

html - 使页脚在移动 View 和桌面 View 中都停留在页面底部

javascript - 即使 `alert` 是 `this`,如何在严格模式下的函数中定义 `undefined`?

javascript - Angular .min.js :127 Error: [$controller:ctrlreg] angularJs

css - :hover selector being detected even when behind another element

javascript - 将 html2canvas 中的图像保存到文件夹内