Html Forms

Html Forms

learn all about HTML forms!

Hello guys! Welcome back!

Today we're going to discuss HTML forms and begin some basics of CSS

Let's start with forms,
Forms are used as interactive software to enable website developers to get feedback and responses from a particular or wide audience.

Because there are different types of forms, there are different tags for forms.

To create labels
Where users enter personal data, we use the label tag. The example below shows a Username label. The (required="required")makes it compulsory for users to fill.

Screenshot 2021-05-30 093016.png

To create a checkbox
We use label tags and input type as the checkbox. This allows more than one option to be chosen. The example below asks users to select their favourite chocolate.

Screenshot 2021-05-30 091328.png

The (checked="checked") is used to influence user choice as it selects that option automatically, as seen, Snickers is chosen automatically.

To create option buttons
We also use label tags and input type as radio. This only allows one option to be chosen The example below asks users to select their favourite primary colour.

Screenshot 2021-05-30 091615.png

To create a drop-down box
These drop-down boxes are also another way to ensure users select an option. We use label tags, select name and option value.

Screenshot 2021-05-30 091835.png

The (select="selected") will be the first option chosen to influence user choice and decisions

To get direct feedback from users
We use a text box, we can control the number of words allowed and the height and width of the textbox. We use to label and text area tags.

Screenshot 2021-05-30 092224.png

To create a space for file uploads and submission
We use to label and input tags. For uploads, (input type="file"), while for submissions, (input type="submit")

Screenshot 2021-05-30 092409.png

To create a data fieldset
We use fieldset, legend, label tags and input type as text.

image.png

That's all for now guys!
Thanks for reading 🥰🥰