Home  >  Article  >  Web Front-end  >  What does type mean in HTML?

What does type mean in HTML?

青灯夜游
青灯夜游Original
2020-12-24 13:50:3326098browse

In HTML, type means type, which is a tag attribute. It is mainly used to define the type of tag element or the MIME type of the document (script); for example, in the input tag, the type attribute can specify the input element. Type, the type attribute in the script tag can specify the MIME type of the script.

What does type mean in HTML?

The operating environment of this tutorial: windows7 system, html5 version, Dell G3 computer.

Recommended: html tutorial

type is a tag attribute in HTML.

  • The type attribute of the HTML d5fd7aea971a85678ba271703566ebfd tag specifies the type of the input element.

  • The type attribute of the HTML 3499910bf9dac5ae3c52d5ede7383485 tag specifies the MIME type of the target document; it can only be used when the href attribute is present.

  • HTML c9ccee2e6ea535a969eb3f532ad9fe89 type attribute specifies the MIME type of the style sheet, indicating the content between the c9ccee2e6ea535a969eb3f532ad9fe89 and 531ac245ce3e4fe3d50054a55f265927 tags; the value "text/css" indicates Content is standard CSS.

  • The type attribute of the HTML 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag specifies the MIME type of the script.

    MIME types consist of two parts: media type and subtype. For JavaScript, the MIME type is "text/javascript".

Example:

button: Defines a clickable button (usually used with JavaScript to launch a script).

<input type="button" name="" id="" value="按钮">

checkbox: Define checkbox.

<input type="checkbox" name="" id="">男<br>
<input type="checkbox" name="" id="" checked>女<br>

color: Define the color picker.

<input type="color" name="" id=""><br>

date: Define date control (including year, month, day, excluding time).

<input type="date" name="" id="">

"text/css" indicates that the content is standard CSS.

<style type="text/css">
h1 {color:red;}
p {color:blue;}
</style>

For more programming-related knowledge, please visit: Programming Teaching! !

The above is the detailed content of What does type mean in HTML?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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