Hi Priscila!
Your survey form looks really cool! I like that you used that little CSS to centre the content (it is very helpful to explore the content that way). I think your exercise checks most of the typical inputs, which is really nice.
Regarding the feedback:
- We've talked a lot about using meaningful HTML elements when creating our pages. In this case, I see you are using a
div to wrap the entire content, and I think we know some others that are more meaningful.
- It is not a good practice to add an
id attribute to every item in your HTML page. The id serves a purpose, and it is not a mandatory attribute. Now you are working with small pages, but when you have bigger sites, those ids are going to collide. In your case, I'd only keep them for the inputs, as they are needed to relate the field with that input.
- I see that you are using some p tags instead of labels. Try to always relate the text with the input.
- Try to use the HTML validator we shared the other day, as you will avoid potential errors on your page. In this case, I can see a duplicated
form tag and some misplaced label-id relationships.
Some other suggestions:
- When working with forms and inputs, it is usually a good practice to wrap related fields inside a
fieldset tag. In this case, you can
- Try to be a bit more careful with the indentation, as it is a bit hard to read the content.
- Try to add a little readme to every project you have, explaining what is the objective or your project, and the important things you have done there
- Remember the HTML structure:
<html>
<head>...</head>
<body>
<header>...</header>
<main>...</main>
<footer>...</footer>
</body>
</html>
While it is not mandatory, it is very useful to give that structure to your page.
Overall, I think it is a good exercise, but you need to pay a little bit more of attention to those small details.
Congrats!
Hi Priscila!
Your survey form looks really cool! I like that you used that little CSS to centre the content (it is very helpful to explore the content that way). I think your exercise checks most of the typical inputs, which is really nice.
Regarding the feedback:
divto wrap the entire content, and I think we know some others that are more meaningful.idattribute to every item in your HTML page. The id serves a purpose, and it is not a mandatory attribute. Now you are working with small pages, but when you have bigger sites, those ids are going to collide. In your case, I'd only keep them for the inputs, as they are needed to relate the field with that input.formtag and some misplaced label-id relationships.Some other suggestions:
fieldsettag. In this case, you canWhile it is not mandatory, it is very useful to give that structure to your page.
Overall, I think it is a good exercise, but you need to pay a little bit more of attention to those small details.
Congrats!