When the script executes, it will generate an output with input fields for the username and lastname (set by type="text"), as well as a submit button and a reset button.
HTML Tags
Tags specify fields into which users can enter data. The most important form element is the element. Depending on the type attribute, the element can be rendered in a number of different ways.
Example
Consider the following example where we use an HTML form with two different input types, one for text and another for submission.
When you run the above script, it will produce an output that includes an input field with a name of type="text" and an input button with a type="submit" attribute.
Use script
Look at the following example, we are running a script with the type attribute specified
Example
In the example below, we use two tags, one for commit and the other for reset.
When the script executes, it will generate an output containing the audio uploaded on the webpage mentioned with type="audio/mpeg".
The above is the detailed content of How do we set the type of an element in HTML?. For more information, please follow other related articles on the PHP Chinese website!
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn