Survey_ Form _Project

Hey Everyone! Hope you all doing well.
Here is my second project of Survey Form:
https://codepen.io/MRB-Faysal/pen/eYvewGq
It’ll be great to have your opinion on it.
Thanks in advance.

Your form looks good @MRBFaysal. Some things to revisit;

  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in the HTML editor. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.
    • Mentioning because you have elements out of order. For instance, the link to a stylesheet would go in the head element. (You do not need to declare either of these in codepen) You should review this for an understanding of the HTML boilerplate tags.
  • Run your HTML code through the W3C validator.
    • There are HTML syntax/coding errors you should be aware of and address.
    • Since copy/paste from codepen you can ignore the first warning and first two errors.
  • Run your CSS code through the W3C validator.
    • There are syntax/coding errors you should be aware of and address.
  • Only elements within the body element can be styled. The head element is not one of them.
  • It’s a bad UX for the user to have to delete text from the textarea in order to enter their comments
  • The form says “Age” is optional yet it’s a required field. This is a bad UX.
  • Do not use the <br> element to force line breaks or spacing. That’s what CSS is for.

On a side note

  • the “Segoe UI” font family is a downloadable font that not everyone will have on their box. It would be better if you use font family from Google fonts.
  • Click on the chevron in the upper right of both the HTML and CSS editors and then click the respective “Format” links to organize your code to make it easier to read.

There are lots of mistakes, sorry.
I think this is few improved now: https://codepen.io/MRB-Faysal/pen/eYvewGq
You’ve helped me a lot sir. Thank you.

Good job cleaning things up @MRBFaysal. Some things to revisit;

  • Codepen provides validators for HTML, CSS and JS. Click on the chevron in the upper right of each section and then click on the respective ‘Analyze’ link.
    • The one for CSS is good. Use it and address the issue(s).
    • (The one for HTML misses things which is why I recommend W3C)
  • There are still quite a few <br> elements. Do not use the <br> element to force line breaks or spacing. That’s what CSS is for.
    • Instead of using <br> elements to have each inline element on a new line use, or set, container elements to be block-level elements so they’ll each take up the full width.
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.