Browser will not display image

2019-09-16 12:40发布

I'm building a simple website example where I added an image. I'm using textedit on mac. However, special characters are being added to the file when I look in Chrome's inspector.

In textedit I type

<img src =“images/nicole.png”>

But it displays as

<img src="“images/nicole.pngâ€""> 

Why is this happening?

2条回答
Ridiculous、
2楼-- · 2019-09-16 13:06

The quote you are currently using is a Unicode version (Most likely the Chinese version). That's why it is showing as those weird chars. Try to copy and paste this " into your code instead of typing them in should fix it. You might want to check your IME setting or text editor setting to prevent it in the future.

查看更多
爷的心禁止访问
3楼-- · 2019-09-16 13:24

In the TextEdit preferences (TextEdit menu > Preferences), uncheck "Smart quotes" under Options.

You will have to go through and replace all of them.

查看更多
登录 后发表回答