FSR060523 :- Input types | Form Attributes

Q.s 1 - Why do we use Placeholder, Type & Value Attributes in Input Tag ?
Q.s 2 - What is the difference between radio and checkbox button

2 Likes

The use of placeholder is to provide the information which we added in label . In radio we can use only one option but in checkbox we can use more option

3 Likes

the value attribute specifies the value of input element
checkbox allow to choose item from fixed number of altervative radio radio to choose exactily one item

3 Likes

The placeholder, type, and value attributes are commonly used in the <input> tag to provide additional information or set default values for input fields. Here’s a breakdown of their purposes:

  1. Placeholder attribute: The placeholder attribute is used to display a short hint or example text inside an input field before the user enters any value. It helps provide guidance or instructions to the user regarding the expected input format or the type of information required. For example, you can use placeholder="Enter your name" to prompt the user to enter their name.
  2. Type attribute: The type attribute defines the type of input expected from the user. It influences the behavior and appearance of the input field. Common type values include:
  • text: Creates a single-line text input field.
  • password: Creates a password input field where the entered text is masked.
  • email: Creates an input field specifically for email addresses, which can trigger email validation.
  • number: Creates an input field for numeric values.
  • date: Creates an input field for date selection.
  • checkbox: Creates a checkbox for selecting one or more options.
  • radio: Creates a radio button for selecting a single option from multiple choices.The type attribute helps ensure that the user provides input in the expected format and enables browser-specific input validation and behavior.
  1. Value attribute: The value attribute sets the initial value of an input field. It can be used to prefill or set a default value for the input field. For example, you can use value="Akshitha" to display “Akshitha” in a name input field by default. The user can modify the value if needed.
4 Likes

whenever I choose only one option to be select then use ratio button and when choose multiple option at time then used checkbox button

placeholder provide information of the form

3 Likes

Ans1. placeholder is used for insteed of using name of input. It is background text. Type is used to display the type input field. Like text, number, email. Value id for give the value to the input field.
Ans2. we cannnot toggle the radio button and we can toggle the checkbox. In radio we can select it only one option, in the checkbox we can select multiple option.

2 Likes

thats why your marks are 86%. Wow!

2 Likes

Q1
Placeholder: hint to describe what form of output is expected.
type:- attribute often used for linking elements.
value:- specifies the value of an element.
Q2
Radio is used in the form for single select only whereas checkbox is for multi select. Radio is a checkbox without name attribute.

2 Likes

1.Placeholder: it describes the expected value of an input field
value : it specify the default value of the input field
type : it defines the type

2.Checkbox: it allows the user to choose multiple option
Radio : it allows to user to choose one of option

.

2 Likes
  1. The placeholder attribute specifies a short hint that describes the expected value of an input field.
    Value attribute puts actual content inside of a form and type attribute specifies the type of element to display.
  2. Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.
2 Likes

1.placeholder is a short hint type where we can see enter the name
Type attribute is nothing but where we can type text password and number
Value is nothing where we can enter the name or input
2.Radio button is used to select one box
But check box is used to select multiple box for choices

2 Likes

Qs.1 Placeholder: The placeholder attribute is used to provide a short hint or example text that is displayed in the input field before the user enters their own value.

Qs.2 Radio Buttons:
Radio buttons are used when you want users to select only one option from a list of mutually exclusive options.
Multiple radio buttons are grouped togeher using the same name attribute value.
Only one radio button in a group can be selected at a time.

checkboxes:
Checkboxes, on the other hand, alow users to select multiple options from a list.
Each checkbox is independent of the others and does not require a grouping mechanism.
Users can select one or more checkbxes at the same time.

2 Likes

1.placeholder is for reference msgs, type is to know the character of the labels, value is for input field
2.radio is to select one option checkbox can select all or single option

2 Likes

we use placeholder attribute for displaying in the input filed before user enters the value
radio is allow us to choose only one value,while checkbox is used to choose multiple values.

2 Likes
  1. placeholder is used for like water mark ,it will appears in the text box
    type is used to put the what type of box we want like checkbox
    value is used for , to give a value in option
  2. radio button is used for when we want to select single option
    checkbox is used for when we want to select multi options
2 Likes

placeholder is use to represent the short description of the expected output
type is used by attributes of that type are compared and sorted
value attribute is used to specify the value of the element with which it is used.

checkbox operates individually, so a user can toggle each response “on” and “off.”
operate as a group and provide mutually exclusive selection values

2 Likes

Ans 1: Placeholder give a description about expected value of an input. type attribute specifies the type of input element to display. and value defines the default value of input field.

Ans 2: In checkbox user can select more than one option .Radio buttons operate as a group and provide selection values.

2 Likes

Placeholder attribute specifies a short hint that describes the expected value of an input field or a text area.
The value attribute on an tag sets the value of the element.
Type attribute defines a single-line text input field

A radio button is used when you want to select only one option out of several available options while Checkbox allows one or many options to be selected.

2 Likes

It’s me Gajalakshoumy
But my email id is jhansi570821

2 Likes

placeholder for shadow text, type for which datatype and value attributes for addition information

2 Likes