如何使用 id 和 link 制作书签作为正确的 link?

How do I make a bookmark using id and link work as a proper link?

<!DOCTYPE html>
<html lang="en-US">

<head>
  <title>Shanghaiers' TV &amp; Radio - Television</title>
  <meta charset="UTF-8">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="style-tvradio.css">
  <link href="https://fonts.googleapis.com/css?family=Goudy+Bookletter+1911" rel="stylesheet">
  <base href="NEED MAIN WEBSITE ADDRESS HERE">
</head>

<body> 
  <h3>Shanghaiers' Television</h3>
  <section>
 <div>
   <ul>
     <li><a href="tv/allvideos.html">All Videos</a></li>
  <li><a href="#concert">Concerts</a></li>
  <li><a href="#nn">Native Nations</a></li>
  <li><a href="#human">Human Trafficking</a></li>
  <li><a href="#sacred">Sacred Lands</a></li>
  <li><a href="#story">Story Telling</a></li>
  <li><a href="#bigfoot">Big Foot &amp; Sasquatch</a></li>
  <li><a href="#interview">Interviews</a></li>
  <li><a href="#psa">Public Service Announcements</a></li>
  <li><a href="#shanghai">Shanghai Tunnels</a></li>
   </ul>
 </div>
  </section>
  
 <h3 id="concert">Concerts</h3>
    <p>en Taiko</p>
    <p>Maiah Wynee</p>
  
    <h3 id="nn">Native Nations</h3>
  <p>Native American Music</p>
  <p>Occupation of Malheur Wildlife Refuge</p>
  <p>NAYA Canoe Family</p>
  <p>Grand Ronde Tribe Disenrollment &amp; Chinook Language</p>
   
    <h3 id="human">Human Trafficking</h3>
       <p>More info here...</p>

    <h3 id="sacred">Sacred Lands</h3>
       <p>More info here...</p>

    <h3 id="story">Story Telling</h3>
       <p>More info here...</p>
  
</body>
</html>

我在页面上创建了书签以从导航菜单跳转到页面上的其他位置。这是使用 id="name";在导航菜单中的位置。测试代码时,这些 bookmarks/links 不起作用。他们要么什么都不做,要么显示一条错误消息,指出无法找到该页面。

发现在锚标记中放置一个额外的“#”可以解决问题。这没有任何作用。前任。 - 。

关于如何更正问题以使书签实际用作链接的任何建议?

您只需删除错误的 baseref 标签即可使其正常工作。

<!DOCTYPE html>
<html lang="en-US">

<head>
  <title>Shanghaiers' TV &amp; Radio - Television</title>
  <meta charset="UTF-8">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="style-tvradio.css">
  <link href="https://fonts.googleapis.com/css?family=Goudy+Bookletter+1911" rel="stylesheet">
</head>

<body>
  <h3>Shanghaiers' Television</h3>
  <section>
    <div>
      <ul>
        <li><a href="tv/allvideos.html">All Videos</a></li>
        <li><a href="#concert">Concerts</a></li>
        <li><a href="#nn">Native Nations</a></li>
        <li><a href="#human">Human Trafficking</a></li>
        <li><a href="#sacred">Sacred Lands</a></li>
        <li><a href="#story">Story Telling</a></li>
        <li><a href="#bigfoot">Big Foot &amp; Sasquatch</a></li>
        <li><a href="#interview">Interviews</a></li>
        <li><a href="#psa">Public Service Announcements</a></li>
        <li><a href="#shanghai">Shanghai Tunnels</a></li>
      </ul>
    </div>
  </section>

    <h3 id="concert">Concerts</h3>
    <p>en Taiko</p>
    <p>Maiah Wynee</p>

    <h3 id="nn">Native Nations</h3>
    <p>Native American Music</p>
    <p>Occupation of Malheur Wildlife Refuge</p>
    <p>NAYA Canoe Family</p>
    <p>Grand Ronde Tribe Disenrollment &amp; Chinook Language</p>

    <h3 id="human">Human Trafficking</h3>
    <p>More info here...</p>

    <h3 id="sacred">Sacred Lands</h3>
    <p>More info here...</p>

    <h3 id="story">Story Telling</h3>
    <p>More info here...</p>

</body>

</html>