FAQ: Learn HTML - Intro to HTML - Images

I don’t understand what it means booleans. I do not speak a lot of english so maybe you can explain me what it is with other words and if you want the value chacked too

Boolean attributes are ones that do not need a name since the value is the name. When it is included in the markup it means true.

<input type="checkbox" checked>

Above, checked is a boolean attribute. It tells the browser to draw that box with a check.

1 Like

Previously, I have learned to use the img tag as img
So, that is a different notation than you propose.
Is this also possible?

NB Other question: How can I add code to a forum post as illustration, without having to upload an image? I first wrote this code inline, but then it was actually interpreted as HTML-code without visually rendering it as text in this post.

<img src="..."></img> is valid XHTML. Not something you should worry about these days, but you can make a quick search to find out more about it :wink:

<img src="..." /> is also valid XHTML.

The only valid HTML(5) tag that you should use nowadays is <img src="...">

You can add code using </> in the toolbox.


In the course it still says <img src="image-location.jpg" />, which then would be XHTML.

Although they mention that the / can be omitted.

What is the difference between HTML(5) and XHTML?