I have just started the Survey Form Page task.
First, I have approached this slightly differently compared to the previous task of The Tribute Page. For example, this time I have started with only the HTML aspect as wanted to get the ‘bare bones’ complete before ‘dressing’ the page with CSS. Any comments of this practice is much appreciated…is it a good approach?
Second, I am getting 7/17 right in the tests with the majority of the errors linked to the need to add required> to enable a HTML validation error to appear if the wrong text is put in the box.
Please can anyone hint or let me know why even though I am adding required> that it is still not showing up on the test. I have added it yet it is not being acknowledged.
Here is my link.
This is very much work in progress so please do not expect the finished item here !
Am I missing something really obvious or indeed many things ?
thanks in advance.
When tests fail click the red button to see which test(s) are failing and text to help you correct the issue. (Be sure and read more than just the first line of the failing message.)
Inside the form element, I am required to enter my name in a field with id="name". If I do not enter a name I will see an HTML5 validation error.
There should be an input text field with id="name" : expected null to not equal null
AssertionError: There should be an input text field with id="name" : expected null to not equal null
Also, you can revisit this lesson.
Don’t forget to search.
Your approach is good. It’s better IMO to get as many user stories to pass prior to styling. It’s easier to have the bare bones that have half and try and squeeze the next story in.
It also gives you a kind of big picture overview of how you have things laid out.
I think doing the html first is a good approach for the survey form.
Make sure your
input fields have the correct
id. For example,
I am required to enter my name in a field with id=“name”.
So the input field where the user enters their name should have the attribute
And so on.
Hope this helps.
Thanks again @Roma! Huge help to suggest to read more than the first line - that was exactly what I wasn’t doing…
Yes, it is helping me doing the bare bones first though I anticipate a muddle now as I move to CSS.
Thank you for the big and helpful hint. I finally got there and have somehow been propelled onto completing all the tests.
Now time for a break and then to CSS! Thank you for your confirmation that doing html first is a good approach. Best wishes , Dotdash.
@dotdashhenry, as you’re getting started on CSS two things;
- Run your HTML code through the W3C validator.
- There are HTML coding errors you should be aware of and address.
- Do not use the
<br> element to force line breaks or spacing. That’s what CSS is for.
Have fun. Look forward to seeing your completed project.