HTML链接不工作(使用基础href) [英] html links not working (using base href)

查看:141
本文介绍了HTML链接不工作(使用基础href)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < base href =http://awebsite.ca/ target =/> 

与此标记相关联:

 < a href =main_page / mainpage.html>< br>< b> main< / b>< / br>< / a> 

并在浏览器中获取:

<$ $ p $ $ b

解决方案

您必须使用(引号)或'(APOSTROPHE),而不是(LEFT DOUBLE QUOTATION MARK)和

这种类型的错误通常是由于使用文字处理程序(例如Microsoft Word或Apple Pages)编写代码并自动替换引号引起的可以使用文本编辑器(例如Visual Studio Code,Sublime Text,Komodo Edit,Emacs或Vim)。


hi there I am using this tag:

<base href="http://awebsite.ca/" target=" />

in association with this tag:

<a href="main_page/mainpage.html"><br><b>main</b></br></a>

and getting this in the browser:

http://awebsite.ca/“main_page/mainpage.htmlâ€%C2%9D

解决方案

You have to quote attribute values with " (QUOTATION MARK) or ' (APOSTROPHE), not " (LEFT DOUBLE QUOTATION MARK) and " (RIGHT DOUBLE QUOTATION MARK).

This type of error is typically caused by writing code using a word processor (such as Microsoft Word or Apple Pages) with automatic replacement of quotes with typographic quotes (aka Smart Quotes) enabled. Try using a text editor (such as Visual Studio Code, Sublime Text, Komodo Edit, Emacs, or Vim) instead.

这篇关于HTML链接不工作(使用基础href)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆