Home >Web Front-end >HTML Tutorial >HTML form elements
d5fd7aea971a85678ba271703566ebfd element
The most important form element is the d5fd7aea971a85678ba271703566ebfd element.
d5fd7aea971a85678ba271703566ebfd Elements can change into multiple forms according to different type attributes.
221f08282418e2996498697df914ce4e Element (drop-down list)(Recommended learning: HTML Introduction Tutorial)
221f08282418e2996498697df914ce4e Element Definition Drop-down list:
Example
<select name="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="fiat">Fiat</option> <option value="audi">Audi</option> </select>
5a07473c87748fb1bf73f23d45547ab8 element defines the option to be selected.
Lists usually display the first option as the selected option.
You can define predefined options by adding the selected attribute.
Example
<option value="fiat" selected>Fiat</option>
4750256ae76b6b9d804861d8f69e79d3 Element
4750256ae76b6b9d804861d8f69e79d3 The element defines a multi-line input field (text field ):
Example
<textarea name="message" rows="10" cols="30"> The cat was playing in the garden. </textarea>
The above HTML code is displayed in the browser as:
The cat was playing in the garden.
bb9345e55eb71822850ff156dfde57c8 element
bb9345e55eb71822850ff156dfde57c8 element defines a clickable button:
Instance
<button type="button" onclick="alert('Hello World!')">Click Me!</button>
The above is the detailed content of HTML form elements. For more information, please follow other related articles on the PHP Chinese website!