html links not working (using base href)

橙三吉。 提交于 2019-12-17 06:18:44

问题


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

回答1:


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.

The other common cause for this error is copy/pasting code from a website where the author has let a WordProcess CMS or similar mangle their input in the same way as a word processor. Check code you are copy/pasting carefully.



来源:https://stackoverflow.com/questions/22606556/html-links-not-working-using-base-href

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!