Using Quotation marks in links


#1

Hello ,I am new to programming and i was thinking that whether adding quotation marks is necessary or not in hyperlinks in html.
< a href=“https://en.wikipedia.org/wiki/Brown_bear” target="_blank" >Learn More
< a href=https://en.wikipedia.org/wiki/Brown_bear target=_blank >Learn More
Sometimes both works on codeacademy’s editor sometimes only the link with quotation marks does.


#2

Hi @alexnomac,

While you can certainly make do without using quotation marks with more modern browsers, it is always better and advisable to use it in my opinion to avoid unnecessary errors down the road. It helps with specifying where an attribute value starts and finishes.

For further reading and explanations:


Hope this helps.


#3

This topic was automatically closed after 7 days. New replies are no longer allowed.