Muaj ntau tus HTML cim npe nyob rau hauv HTML4 thiab HTML5 uas tsis tas siv daim ntawv xaus rau HTML siv tau. Lawv yog:
Vim tias feem ntau ntawm cov cim npe no tsis muaj qhov xaus rau qhov xaus yog tias feem ntau, qhov kawg lossis yog siv los ntawm muaj lwm daim ntawv hauv daim ntawv. Piv txwv, nyob hauv ntau cov ntaub ntawv hauv web, ib pawg lus (txhais los ntawm
) yog tom qab los ntawm ob tog lus los yog los ntawm lwm lub tshev theem . Yog li, tus browser tuaj yeem kho tau tias nqe lus tau xaus los ntawm pib ntawm pawg lus txuas ntxiv.
Lwm cov cim npe hauv daim ntawv no tsis tas yuav muaj cov ntsiab lus, xws li. Lub caij no muaj cov cim npe tab sis tsis tas yuav. Yog hais tias ib pawg neeg tsis muaj cov cim npe xim, tawm qhov kev kaw lus tsis ua rau tsis muaj kev ntxhov siab-feem ntau tus lej ntawm cov kab uas yuav tsum tau txhais los ntawm qhov kev ntaus nqi.
Leaving Out End Tags ceev txog koj cov nplooj ntawv
Ib qho laj thawj zoo rau kev tawm qhov kawg ntawm cov ntsiab lus rau cov ntsiab lus yog vim lawv ntxiv cov cim ntxiv rau cov nplooj ntawv download thiab li qeeb ntawm cov nplooj ntawv. Yog tias koj tab tom nrhiav cov khoom ua kom ceev txog koj qhov web page downloads, tau tshem ntawm cov ntaub ntawv yeem kaw yog qhov chaw pib zoo. Rau cov ntaub ntawv uas muaj ntau ntau cov lus los yog cov ntaub ntawv lub hlwb, qhov no yuav yog qhov tseem ceeb txuag.
Tab sis Leaving Out Closing Tags yog tsis zoo tag nrho
Muaj qee yam tseem ceeb uas tawm hauv cov cim npe xaus.
- Cov cim npe kaw kaw lus.
- Thaum koj muaj cov ntaub ntawv HTML uas yog qhov tsawg teev tau nws yuav thauj khoom sai sai, tab sis nws yuav ua tau kom muaj dais tuav. Ntxiv cov lus tshiab los yog kab yuav ua rau nyuab nyuab heev ua tsis tau tag nrho ntawm pib thiab xaus tags. Thiab feem ntau cov neeg daws tau qhov no los ntawm qhov uas ntxiv cov cim rov qab rau hauv daim ntawv, yog li negating qhov kev pabcuam uas koj tau txais los ntawm lawv.
- CSS thiab JavaScript nuv ntawm tag nrho cov ntsiab lus.
- Thaum cov browsers feem ntau tuaj yeem tso saib (thiab cov yeeb yaj duab) tsis tag lawv cov cim npe kaw, qhov tsis muaj cov cim npe kaw tsis muaj peev xwm ua kom qhov chaw kaw lus tsis zoo los yog cov ntawv sau. Yog hais tias koj ua haujlwm nrog layouts heev, koj tso cai tswj cov lus tshaj tawm thaum koj tawm tawm cov cim npe-koj cia kom tus browser txiav txim qhov twg lub tag tag. Qee zaum browsers twv txoj cai, thiab qee zaus tsis.
- Cov npe tag nrho tsis pub txhua zaus.
- Hauv HTML5, tus
- lossis tom qab tau muab tshem tawm thaum cov lus qhia tam sim ntawd ua raws li ntawm 25 yam txawv. Tab sis muaj ntau tshaj 100 ntsiab hauv HTML5. Koj puas yuav cim tau txhua qhov teeb meem uas nws siv tau tawm ntawm txoj kev xaus? Nws yog tej zaum yooj yim dua cia li nrog nws.
XHTML kom tag nrho kaw cov cim npe
Qhov tseem ceeb yog vim li cas neeg feem coob siv kaw cov cim npe nrog cov ntsiab lus yog ntawm XHTML. Thaum koj sau XHTML cov cim npe xaus yeej ib txwm xav tau. Yog tias koj npaj rau kev hloov koj cov ntaub ntawv web rau XHTML ntawm txhua lub sij hawm yav tom ntej, nws yog qhov yooj yim kom muaj cov cim npe kaw, kom koj cov ntaub ntawv npaj tau.