Robby Bennett
Robby Bennett

Reputation: 143

Which is the proper & in a string?

I have an image I am referring to in HTML5. It's name is "atmosphere-&-meteorology". When I refer to the , both atmosphere-&-meteorology and atmosphere-&-meteorology show up fine for me. Which way is proper?

Upvotes: 0

Views: 60

Answers (1)

Oriol
Oriol

Reputation: 288310

You can use the W3C Validator.

In this case, if you use atmosphere-&-meteorology, it says

& did not start a character reference. (& probably should have been escaped as &.)

However, if you use atmosphere-&-meteorology, it says

Congratulations! This document was successfully checked as HTML5!

Upvotes: 1

Related Questions