Atribut type

Havola qilinayotgan dokument MIME-turini belgilaydi.

Ushbu atribut href atributi bilan birgalikda ishlatiladi. href atributisiz type atributini ishlatishda ma'no yo'q.

Sintaksis

<a href="manzil" type="MIME-tur">...</a>

Qiymatlari

MIME-turlar

Default qiymati

Yo'q.

Misol

<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <title>a, atribut type</title>
  <style>
   a[type="video/mp4"] {
    background: url(../../sample/icons/video.png) 
    no-repeat 100% 50%;
    padding-right: 24px;
   }
   a[type="audio/mpeg3"] {
    background: url(../../sample/icons/audio.png) 
    no-repeat 100% 50%;
    padding-right: 24px;
   }
  </style>
 </head>
 <body>
  <p><a href="https://www.youtube.com/somevideo.mp4" type="video/mp4">YouTube Video</a></p>
  <p><a href="https://music.yandex.ru/somemusic.mp3" type="audio/mpeg3">Yandex Musiqa</a></p>
 </body>
</html>

Natija

Brauzerlar

Internet Explorer Edge Chrome Opera Safari Firefox
1 12 1 2.1 1 1
Android Firefox Opera Safari
1 1 6 1