6/22/22

HTML Forms and Links

 Links

Links in HTML are created with the <a> tag.



Links also take attributes, some of which are:

  • href - used to refer to the link destination
  • target - which states how the link should be opened


Forms
Forms are used to receive information from users. It is defined within the <form> tag.
Some of the attributes used within the form tags are:
  • action: it points to the page to load once a form is submitted
  • method: specifies the HTTP response (GET or POST) to be used when a form is summitted.



Inputs
The input tags are placed within the form tag, this is what takes the information from the user. Below are some of the input types.

  • text: this is a basic input that receives text, usually used for names.





  • Checkbox:



  • Date: 

  • Email:

  • Radio:



if you noticed in the source code above, both inputs have similar names, this is because they are linked i.e both cannot be active at the same time, if the name is different then the inputs aren't linked. But the id and value differ.

  • Some other input types are:








Blog Archive