Creating a Simple Form

Dear Sciaku Learner you are not logged in or not enrolled in this course.

Please Click on login or enroll now button.

If you have any query feel free to chat us!

Happy Coding! Happy Learning!

Lecture 26:- Creating a Simple Form

Forms in HTML allow users to enter and submit data to a web server for processing. A simple form can be created using the following code:

phpCopy code

<form action="[URL to submit data to]">  <label for="name">Name:</label>  <input type="text" id="name" name="name">  <br><br>  <label for="email">Email:</label>  <input type="email" id="email" name="email">  <br><br>  <input type="submit" value="Submit"> </form>

Here's what the different parts of the code mean:

  • <form>: Defines the start of a form.
  • action attribute: Specifies the URL where the form data should be sent when the form is submitted.
  • <label>: Provides a text description for an input element.
  • for attribute: Associates the label with an input element.
  • <input>: Defines an input field where the user can enter data.
  • type attribute: Specifies the type of input field (e.g. text, email, password, etc.).
  • id attribute: Specifies a unique identifier for an input element.
  • name attribute: Specifies the name of the data submitted with the form.
  • <br>: Inserts a line break.
  • <input type="submit">: Defines a submit button to submit the form.

Note: This is just a simple example, and forms can contain many more input fields, options, and buttons to provide a more complex user interface. The server-side code that processes the form data can also perform various validation checks and data processing tasks before storing or further processing the data.

4. Forms

2 Comments

@niteshguptav63
niteshguptav63 Nov 17, 2024 at 1:39 PM

I am not able to access videos from second class and further. I have already completed first class

@niteshguptav63
niteshguptav63 Nov 16, 2024 at 10:56 AM

When will I get my course?

@admin79
admin79 Nov 17, 2024 at 1:29 PM

Now, Your query was resolved.

Frequently Asked Questions About Sciaku Courses & Services

Quick answers to common questions about our courses, quizzes, and learning platform

Didn't find what you're looking for?

help_center Contact Support