Dab tsi yog DTD hauv HTML?
Dab tsi yog DTD hauv HTML?

Video: Dab tsi yog DTD hauv HTML?

Video: Dab tsi yog DTD hauv HTML?
Video: Minecraft - Теплий прийом! - Частина 1 - Spellbound Caves 2024, Hlis ntuj nqeg
Anonim

Ib hom ntawv txhais lus ( DTD ) yog ib txheej ntawm cov lus tshaj tawm uas txhais cov ntaub ntawv rau SGML-familymarkup lus (GML, SGML, XML, HTML ). A DTD txhais cov ntaub ntawv tsim nyog ntawm XML. Nws txhais cov qauv ntaub ntawv nrog cov npe ntawm cov khoom siv tau thiab cov khoom siv.

Kuj paub, DTD thiab SGML yog dab tsi hauv HTML?

DTD (luv rau Doc type Definition) yog ib hom lus uas siv tau los txhais SGML (los yog XML, tab sis feem ntau XSD siv ntawm no) cov lus. A DTD qhia, cov ntsiab lus twg thiab cov khoom siv tau siv tau hauv cov ntsiab lus hauv ib hom lus.

Tsis tas li ntawd, vim li cas peb thiaj xav tau DTD? Lub hom phiaj ntawm DTD : Nws lub hom phiaj tseem ceeb yog los txhais cov qauv ntawm daim ntawv XML. Nws muaj cov npe ntawm kev cai lij choj thiab txhais cov qauv nrog kev pab los ntawm lawv. DTD muab kev tswj tsawg dua ntawm XML qauv.

Ib yam li ib tug yuav nug, doctype hauv HTML yog dab tsi?

Ib Daim Ntawv Sau Npe Tshaj Tawm, lossis DOCTYPE forshort, yog ib qho kev qhia rau lub web browser txog lub version ofmarkup lus nyob rau hauv uas ib tug web page yog sau. Cov ntaub ntawv forearlier versions ntawm HTML tau ntev vim qhov HTML lus yog SGML-raws li thiab yog li ntawd yuav tsum tau ib tug siv rau a DTD , tab sis tam sim no lawv yog obsolete.

DTD sawv cev rau dab tsi?

DTD

Lub ntsiab lus Txhais
DTD Document Type Declaration (markup languages)
DTD Hnub tim
DTD Qhov rooj rau qhov rooj
DTD Data Type Definition (XML file validation)

Pom zoo: