我试图将我的页面上的一个单词链接到同一页面上更远的另一个部分,但是,当我将该类添加到div并将href添加到链接单词时,它会打开一个新页面,说"未找到"
我做错了什么?
HTML:
<div class="paragraph">If you are installing panels on both walls and
ceiling, it is recommended to do the ceiling first. The ceiling can also be
installed at a later date.
<ul><li>See warnings on Radiant Tube Heater installation - <em>Section
5.3</em></li>
<li>See Special Instructions for installation in cold temperatures -
<em>Section 5.1</em></li>
<li>See Recommended Fasteners - <em><u><a
href="recommended_fasteners">Section 4.1</a></em></u></li></ul></div>
<div class="recommended_fasteners"
style="text-align:right;">
<strong>SECTION 4.1</strong></div>
提前致谢!
答案 0 :(得分:2)
你在那里缺少哈希。要确保您不从页面导航,您需要向URL添加哈希值。使用此:
<div class="paragraph">If you are installing panels on both walls and
ceiling, it is recommended to do the ceiling first. The ceiling can also be
installed at a later date.
<ul><li>See warnings on Radiant Tube Heater installation - <em>Section
5.3</em></li>
<li>See Special Instructions for installation in cold temperatures -
<em>Section 5.1</em></li>
<li>See Recommended Fasteners - <em><u><a
href="#recommended_fasteners">Section 4.1</a></em></u></li></ul></div><br><br><br><br><br><br><br><br><br><br><br>
<div id="recommended_fasteners"
style="text-align:right;">
<strong>SECTION 4.1</strong></div>
&#13;