问题
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