I just discovered something about HTML that should’ve been obvious but somehow slipped under my radar.
In HTML, the
src attribute for
<img> tags
don't actually need to be wrapped in quotes as long as it's a simple string without spaces or special characters. 🤯
For example:
<img src=example.png>
works the same way as
<img src="example.png">
While quoting attributes is generally best practice for consistency and readability, it turns out the browser can handle unquoted values just fine in many cases.
Just goes to show that
no matter how long you've been coding, there's always something new to learn!