HTML type attribute

type attribute represents the type of list item markers, the type of embedded resources or the type of butoon (submit, reset, button).

<ol type="A">
  <li>Mix both solutions</li>
  <li>Stir them well.</li>
  <li>Add a few drops of the sulphuric acid.</li>
  <li>Heat it up to 20 minutes at 88 Celsius temperature.</li>
  1. Mix both solutions
  2. Stir them well.
  3. Add a few drops of the sulphuric acid.
  4. Heat it up to 20 minutes at 88 Celsius temperature.

Attribute values

All possible values of type attribute

There are many values of type attribute that behave differently for different tags.

For example, text/html, text/css, text/js, video/mp4, audio/mp3, image/jpg, submit, reset.

Related Tags

The tags that support type attribute

<button> tag

It defines a button. The type of button may be 'submit', 'reset'.

<button type="submit" name="submit">submit</button>
<button type="reset" name="reset">reset</button>

<object> tag

The reset keyword resets the values in input controls. And the input fields become empty.

<object src="files/start.html" type="text/html"> </object>

<embed> tag

It embeds external resources (image, html pages).

<embed src="files/web.png" type="image/png">

<script> tag

script tag adds scripting language in the page.

<script src="files/js.js" type="text/js"> <script>

<source> tag

source tag is nothing on its own. But it is useful when used with other elements.

 <source src="fiels/sample.mp3" type="audio/mp3">

<style> tag

style tag specifies the CSS properties to style the content.

<style type="text/css">

<ol> tag

ol means ordered lists. See the above given example.

Was this article helpful?