Assessment wanted for Basic controls 1,2 and 3 skill tests

please assess: https://codepen.io/zortron756/full/wvMeRqB

and: https://codepen.io/zortron756/full/LYGLMjB

and: https://codepen.io/zortron756/full/MWKoZEm

Hi @church_craig !

Looking at these…

The first one is perfect.

The second one is perfect, except that you can select more than one radio button at once. To associate a group of radio buttons together, you need to give them all the same value of name, so for example in this case name="pony" would make sense. Then when you submit the form, the data is submitted as name=[value-of-selected-pony]

The third one is pretty close, but there are a couple of fixes to make:

  • The <label> element’s for value is gallery-img, so the id of the corresponding <input> should also be gallery-img.

  • You’ve included accept="image/*", but the instruction is for the file to only accept JPGs and PNGs. The accept attribute can accept multiple space-separate mime types, i.e. accept="image/png, image/jpeg"

does it have to be accept="image/png, image/jpeg", or could it also be accept="image/png, image/jpg"? what is the difference between jpg and jpeg anyway? and why do some images have the .jpeg extension?

This is an interesting question. I think you can also specify accepted file extensions, so for example accept="*.png, *.jpg, *jpeg". But the official mime type of JPEGs is image/jpeg. jpg and jpeg are just file extension variants that JPEG images are commonly served with, so OSes have come to recognise them and you can set specific file names to be opened by specific applications, etc.

But the MIME type is more important than the extension when handling files in applications.

For info on MIME types and how they work: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types

For more info on common MIME types, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types