Puas yog IMG tag yuav tsum raug kaw?
Puas yog IMG tag yuav tsum raug kaw?

Video: Puas yog IMG tag yuav tsum raug kaw?

Video: Puas yog IMG tag yuav tsum raug kaw?
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim

Qhov < img ua > tag sawv cev rau qhov paub tias yog lub caij tsis muaj dab tsi (saib HTML5 spec), yog li hu ua vim nws tsis tuaj yeem muaj cov ntsiab lus (tsis zoo li, hais lossis). Yog li ntawd tsis muaj qhov sib txawv vim li cas nws yuav tsum yuav tsum tau kaw hauv HTML. XHTML, txawm li cas los xij, yog nyob ntawm XML, qhov twg txhua tus tag yuav tsum kaw.

Tom qab ntawd, BR tag puas yuav tsum raug kaw?

< br > yog ib qho khoob tsis muaj ib kaw tag (cov < br > tag txhais ib kab ntawv). Tswv yim: Hauv XHTML, tag nrho cov ntsiab lus yuav tsum yog kaw . Ntxiv aslash hauv qhov pib tag , zoo li < br />, yog txoj kev zoo kaw Cov ntsiab lus khoob hauv XHTML (thiab XML).

Ib tug kuj yuav nug, dab tsi yog tus kaw tag? A tus kheej - kaw tag yog ib keeb ntawm HTML code uas tau hloov zuj zus hauv cov lus. Feem ntau, cov tus kheej - kaw tag siv lub "/" cim nyob rau hauv thiaj li yuav zoo kaw qhov pib tag nyob rau hauv lub sideway carets.

Kuj paub, lub cim twg tsis tas yuav tsum tau kaw?

Cov tag yog xaiv tau vim nws yog implied hais tias ib tug tshiab tag tsis yuav tuaj yeem pib yam tsis muaj kaw nws. Cov no yog cov nram qab no: html, taub hau, lub cev, p, dt, dd, li, xaiv, thead, th, tbody, tr, td, tfoot, colgroup. Muaj kuj muaj. tag uas txwv tsis pub kaw: img, tawm tswv yim, br, hr, meta, thiab lwm yam.

Dab tsi yog void ntsiab?

A void element yog ib keeb uas nws tus qauv tsis tso cai rau nws kom muaj cov ntsiab lus nyob rau hauv txhua qhov xwm txheej. Void cov ntsiab lus tuaj yeem muaj tus cwj pwm. Hauv qab no yog ua tiav daim ntawv teev npe void ntsiab hauv HTML: area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track,.

Pom zoo: