Quotation marks

Hi all, Can someone explain why removing the quotation marks in an “img” tag allows the image to show on my webpage but doesn’t show if there are quotation marks? I thought quotation marks are required.

< img src=images/segway2.jpg > - images show

< img src=“images/segway2.jpg” > - images won’t show

Perhaps those are ‘smart quotes’ instead of regular ‘dumb’ quotes.

could help is your code is visible

better you can use single quotes

The below Img tag is what I have in my code. Everything else is fine. If I were to keep the quotation marks below, I get a broken image on my website when loading the site locally. When I remove them, the image shows just fine.
I remember learning to use quotation marks.

< img src=“images/segway2.jpg” >

< img src=“images/segway2.jpg” >
is very different from
< img src="images/segway2.jpg" >

1 Like

< img src=“images/segway2.jpg” >

The above is what I have.

“” These are smart quotes. Don’t use them.
"" These are regular quotes. Use them.

Have you attempted to fix this as @nhcarrigan recommended?

Actually it seems that the discourse editor automatically parses " as smart quotes when wrapped around a “word”…

@Titan619, post that code line again but wrap it in backticks (`) so we get the actual characters.
`code` => code

1 Like

Here you go:

<img src=images/segway2.jpg>

backticks are there but aren’t showing when I post it.

` <img src="blahblahblah"> `

Like this please.

<img src=‘’images/segway2.jpg’’>

Yeah, that won’t work.

You should have
<img src="images/segway2.jpg">

That above is the correct format, but if it doesn’t work then there are other issues.

there is only one key I can use to put quotation marks. Not sure what it can be. Strange how entering the code without the quotation marks works.

I copied your code and it worked. I wonder why my quotes don’t work.

There is one key to put in quotes, but depending upon your text editor (Apple is particularly helpful like this because it knows better than its users) sometimes your regular quotes will be converted to smart quotes.

2 Likes

hmm you are right, it did convert my quotes. Ok looks like I had to adjust the preference from my text editor. This has been resolved. Thank you all for your help.:slight_smile:

1 Like