html links not working (using base href)

2019-01-08 02:28发布

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条回答
狗以群分
2楼-- · 2019-01-08 02:57

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.

查看更多
登录 后发表回答