Click on this link
mphello / survey-form Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Click on this link
I would use border radius CSS for inputs and form element
https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
Is not a good practice use negative values try to play with padding/margin to change this. Maybe the solution could be change the values in the adjacent element
h1 {
display: flex;
justify-content: center;
margin-bottom: -20px;
}
Let's see if we can add breaklines for every input, like in the example. I'd suggest you check the solution and see how the play with the inputs, labels, button, etc.... We don't need <br>
. We can make it from CSS
https://survey-form.freecodecamp.rocks/ Inspect a bit the CSS solution to see how to make the breaklines from CSS.
.submit-button {
display: block;
width: 100%;
...
}
.input-textarea {
min-height: 120px;
width: 100%;
---
}
.input-radio,
.input-checkbox {
display: inline-block;
...
}
Change the font family to make it more personalized
Hi again, Arman :)
Let's go with some feedback about your Survey Form ๐
Some general feedback:
Small improvements I found:
main
tag? Where would you place it?fieldsets
and legends
, so these elements work together to tell screen readers that a group of form fields relate to each other, and to provide a label for the group (documentation).select
dropdown (about current role, line 53): have a look to your select
tag and compare it with the select
tag documentation.. Do u see the difference, and how to fix it?radio
button input (from line 62): I have noticed that on this case you have wrapped your inputs
inside your labels
. That is call "implicit labels" and it is also correct. In your first inputs, you have written then one after the other (that's called "explicit labels"). Semantically, both possibilities are correct, although I have read in many places like this one that, in general, some assistive technologies do not correctly handle "implicit labels" that well. So personally I prefer the more simple way, "explicit labels" (one after the other, as in this documentation) as they are better supported by assistive technology and they look more organized to me. But as both ways are correct, it's up to you :) I just would recommend you that, on this simple exercise, do it always in the same way (explicit or implicit) so your code is as much consistent as possible.submit
button, use the way you have learn on the RefugeesCode materials: a simple input
with a type submit
and a value submit
. Here the documentation.That's all I see that could be improved for now. As you have realised, the form tags are a bit tricky in HTML, they have a lot of attributes and small details that we need to be careful about. So well done!! You can reply to this comment in GitHub if having any doubt. Let me know also when all those fixes are ready, I won't mind having a second look at your code to double-check that everything is perfect ๐
Happy coding!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.