Multimedia da haɗa abun ciki suna taka muhimmiyar rawa wajen haɓaka sha'awar gani da hulɗar shafukan yanar gizo. Anan akwai ƙarin cikakkun bayanai da takamaiman misalai na yadda ake amfani da multimedia da shigar da abun ciki a cikin HTML.
Hotuna
Don nuna hotuna a shafin yanar gizon, yi amfani da <img>
alamar. Ƙayyade tushen hoton ta amfani da src
sifa, kuma samar da madadin rubutu ta amfani da alt
sifa don samun dama.
Ga misali:
<img src="image.jpg" alt="A beautiful sunset">
Audio
Don shigar da fayilolin mai jiwuwa, yi amfani da <audio>
alamar. Ƙayyade tushen mai jiwuwa ta amfani da src
sifa, kuma kuna iya ƙara sarrafawa don sake kunnawa ta amfani da controls
sifa.
Ga misali:
<audio src="audio.mp3" controls></audio>
Bidiyo
Don saka bidiyo, yi amfani da <video>
alamar. Saita tushen bidiyo ta amfani da src
sifa, kuma haɗa da controls
sifa don sarrafa sake kunna bidiyo.
Ga misali:
<video src="video.mp4" controls></video>
Taswirori
Don shigar da taswira daga ayyuka kamar Google Maps, yi amfani da <iframe>
alamar kuma saka lambar haɗa taswirar da sabis ɗin ya bayar.
Ga misali:
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3024..." width="600" height="450" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>
Aikace-aikacen Yanar Gizo
Don shigar da aikace-aikacen yanar gizo ko gidajen yanar gizo na waje, sake amfani da <iframe>
alamar kuma samar da URL na aikace-aikacen gidan yanar gizon.
Ga misali:
<iframe src="https://www.example.com" width="800" height="600" frameborder="0"></iframe>
Waɗannan misalan suna kwatanta yadda ake haɗa nau'ikan multimedia da abun ciki na waje daban-daban cikin shafukan HTML ɗinku. Tabbatar daidaita halaye da girma kamar yadda ake buƙata don tabbatar da ingantaccen nuni da aiki.