scruffyDog
scruffyDog

Reputation: 831

HTML image for a local site

I'm new to HTML and have a quick question with regards to images. Below I have a simple html file I was playing around with. I wanted to put an image into it which is stored in the home directory of my site. The site is local, on my macbook.

<!DOCTYPE html>
<html>
    <body style="background-color:yellow;">
        <h1>My First Heading</h1>
        <p>My first paragraph.</p>
        <p style="color:blue;margin-left:20px;">This is a paragraph.</p>
        <p style="background-color:green;">This is a paragraph.</p>
        <img src=“HoneyBadger.jpg” alt=“Grumpy honey badger”>
    </body>
</html>

However when I open the file with my browser I see a broken link. If I look at the URL of the image in my browser it is,

file:///Users/admin/Sites/project_honey_badger/%C3%A2%E2%82%AC%C5%93HoneyBadger.jpg%C3%A2%E2%82%AC%C2%9D

Some random percent signs and text have been added in? Any idea what I am doing wrong?

Thanks

Upvotes: 0

Views: 64

Answers (1)

Quentin
Quentin

Reputation: 943097

Look at the syntax highlighting Stackoverflow has added. You are using (U+201C: LEFT DOUBLE QUOTATION MARK) and (U+201D: RIGHT DOUBLE QUOTATION MARK) where you should be using " (U+0022: QUOTATION MARK).

This is usually caused by writing HTML using a word processor (with automatic replacement of straight quotes with typographic quotes turned on) instead of a text editor.

Zoomed image

Upvotes: 4

Related Questions