【问题标题】:My <a href=(link_here)>WORD_HERE</a> is not making the word a hyperlink我的 <a href=(link_here)>WORD_HERE</a> 没有将单词设为超链接
【发布时间】:2022-12-31 14:13:11
【问题描述】:

这是我遇到问题的代码部分:

    <footer>
      <p id="footer-text">
For full profile infomation, go to: MI <a href:"https://www.freecodecamp.org/PabloG35" id="profile-link" target="_blank">BOOTCAMP</a> PROFILE
      </p>
    </footer>

这是一个非常初学者的问题,但我真的不知道它有什么问题,我在这里和网站上也看过很多帖子。我很确定这不是语法错误,但无论何时我点击它都没有任何反应,就像标签不存在一样。

我很乐意向你们所有人学习。谢谢

  • 不同的网址
  • 用 div/section 标签代替页脚
  • 更改文本
  • 删除“id”和“target”属性

我希望将 BOOTCAMP 这个词作为这个 url 的超链接:https://www.freecodecamp.org/PabloG35

【问题讨论】:

  • 为什么在 href 后使用 :

标签: html


【解决方案1】:

你的代码说: href:"https://www.freecodecamp.org/PabloG35"

它应该是: href="https://www.freecodecamp.org/PabloG35"

希望有帮助!

【讨论】:

    【解决方案2】:

     <footer>
          <p id="footer-text">
    For full profile infomation, go to: MI <a href="https://www.freecodecamp.org/PabloG35" id="profile-link" target="_blank">BOOTCAMP</a> PROFILE
          </p>
        </footer>

    【讨论】:

      【解决方案3】:

      将 (href:) 更改为 (href=)

      <a href="https://www.freecodecamp.org/PabloG35" id="profile-link" target="_blank">BOOTCAMP</a> (corret)
      <a href:"https://www.freecodecamp.org/PabloG35" id="profile-link" target="_blank">BOOTCAMP</a> (incorret)

      【讨论】:

        【解决方案4】:

        这是因为您错误地制作了 href 和链接键值对。不要放冒号,而是添加“=”。

        <footer>
              <p id="footer-text">
        For full profile infomation, go to: MI <a href="https://www.freecodecamp.org/PabloG35" id="profile-link" target="_blank">BOOTCAMP</a> PROFILE
              </p>
        </footer>

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2017-12-09
          • 1970-01-01
          • 2014-06-10
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多