This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Build Your Own Webpage Forum

View Course » View Exercise

538 points
99f8df08f79cf421f1aee0b2f5825d3a?s=140&d=retro
Submitted by
Marat Zabelinskiy
almost 4 years ago

Can pass this lesson with a missing end tag

The lesson works with the following syntax
<img src="domain.com/image.jpg".

There is no end tag, I believe correct syntax is
<img src="domain.com/image.jpg">

Please correct me if I am wrong.


0 votes

permalink

this is the correct one:<img src="domain.com/image.jpg" />

365 points
543fc82f631fe988640020d7_382532424
Submitted by
Tobias Páez
about 3 years ago


-2 votes

permalink

Its best practice to close tags. Sometimes not closing tags can cause unintended results to occur or pages to not display at all.

Saying that html, as opposed to some other languages, is lenient with sometimes tags not being properly closed and your content will still display as intended.

with image tags there should be a closing slash before the closing tag e.g

<img src="http://www.somewhere.com/apicture.jpeg" />

1227 points
Picture
Submitted by
Guy Stapleton
almost 4 years ago

1 Comment

99f8df08f79cf421f1aee0b2f5825d3a?s=140&d=retro Marat Zabelinskiy almost 4 years ago

Thanks for that info. What I meant to communicate is that this is a problem - there should be a warning that the code is not correct but there isn't.