Form - H T M L

  • <form>
    • <form action = "URL"> => Where request is to be sent
    • <form method = "value"> => Request method to send
    • <form target = "value">
    • <form enctype = "multipart/form-data">
  • <input>
    • <input type = "value">
      • Types => text, email, address, radio, submit, button, password, checkbox, reset, color, date, datetime-local, file, month, number, range, search, tel, time, url, week, image
      • <input type = "file" multiple accept=".pdf">
    • <input name = "val"> => Given value will be received by this
    • <input palceholder = "val"> => A short hint that describes the expected value of an input field
    • <input required> => Input field must be filled out before submitting the form
    • <input list = "val"> => Must refer to id of datalist
    • <input multiple = "val"> => Hold down the CTRL or SHIFT key while to select multiple values
    • <input maxlength = "val"> => Specifies the maximum number of characters allowed in an input field
    • <input size = "val"> => Specifies the visible width, in characters, of an input field
    • <input disabled> => Specifies that an input field should be disabled
    • <input checked> => Specifies that an input field should be checked
    • <input readonly> => Specifies that an input field is read-only
    • <input pattern = "val"> => Regular expression that the input field's value is checked against
    • <input title = "val"> -=>
    • <input step = "val"> => Legal number intervals for an input field
    • <input min/max = "val"> => Specify the minimum and maximum values for an input field
    • <input value = "val"> => Specifies an initial value for an input field
    • <input autofocus> => Input field should automatically get focus when the page loads
    • <input autocomplete = "on/off">
    • <input idName = "val"> => Must be equal to id of the from, to connect it, even if outside the form
    • <input type="image" height/width = "val"> => Specify the height and width
  • <output> => For displaying output
  • <fieldset> => Group related data in a form
  • <legend> => Defines a caption for the <fieldset> element
  • <label for = "idName"> => Should be equal to input id, makes selection by clicking on text
  • <button>
  • <textarea name = "" rows/cols = "val">
  • <select name = "val"> => Defines a drop-down list
    • <select size = "val"> => Specify the number of visible values
    • <select multiple = "val"> => Hold down ctrl key to select multiple option
  • <datalist id = "val"> => Specifies a list of pre-defined options for an <input> element
  • <option value = "val"> => Defines an option that can be selected
    • <option selected>
  • <output name = "val"> => Represents the result of a calculation
    • <output for = "val">
Share: