HTML yog cov lus markup uas siv los tsim cov nplooj ntawv Internet. Nws tuaj yeem siv los kho cov zaub ntawm ntau yam, nrog rau cov duab. Teeb tsa cov duab ntawm cov duab hauv HTML yog nqa los ntawm kev ua cov cim tshwj xeeb.
Cov Lus Qhia
Kauj ruam 1
Qhib koj cov ntawv HTML nrog cov ntawv nyeem kho koj siv los kho cov nplooj ntawv web. Yog tias koj tsis muaj daim ntawv HTML, tsim nws los ntawm txhaj rau sab laug ntawm lub desktop lossis hauv daim nplaub tshev uas xav tau, thiab nyem rau ntawm cov ntawv qhia "Tshiab" - "Cov Ntawv Sau". Nkag mus rau hauv cov ntaub ntawv npe thiab ntxiv cov html txuas ntxiv tom qab lub sijhawm. Tom qab ntawd luag nyem rau ntawm daim ntawv dua thiab xaiv "Qhib nrog" - "Notepad". Koj yuav pom ib daim ntawv dawb paug uas koj tuaj yeem sau HTML code.
Kauj ruam 2
Txhawm rau tsim cov duab hauv HTML, ib qho cim npe yog siv, uas yuav tsum tau muab tso rau hauv ib ntu rau tso saib. Piv txwv li:
Daim duab hauv HTML
Kauj ruam 3
Daim pib tsis raug kaw thiab tsis tas yuav raug kaw lub thoob. Nws lub ntsiab lus tseem ceeb, uas yuav tsum tau siv, yog src, uas tau teeb tsa txoj hauv kev mus rau cov duab xav tau. Koj tuaj yeem qhia nyob rau hauv kab no ob qho tag nrho (nrog https://) thiab tus txheeb ze txoj kev (piv txwv li, /pictures/img.jpg) mus rau cov duab ntawv uas koj xav tso.
Kauj ruam 4
Lwm qhov tseem ceeb tsis yog alt, uas txhais tau lub npe ntawm daim duab thiab nws cov cim ntawm nplooj ntawv. Lub npe no yuav tshwm sim thaum tus neeg siv yuv nas hla daim duab.
Kauj ruam 5
Koj tseem tuaj yeem siv cov qhov dav thiab qhov siab los ua kom tau teeb tsa cov duab. Qhov kev teeb tsa thawj zaug yog lub luag haujlwm rau qhov ntev, thiab qhov thib ob yog rau qhov siab ntawm daim duab ntawm nplooj ntawv. Qhov ntsuas cua no tau teev nyob hauv pixels. Yog li, & & img> tag yuav raug teeb tsa:
Kauj Ruam 6
Siv daim pib no, tsim ib cov duab tsim, txoj hauv kev uas yuav sau cia hauv src attribute. Thaum koj yuj dua daim duab, koj yuav pom xov "duab npe". Hauv qhov no, daim duab yuav yog 300 pixels dav thiab 250 pixels siab. Koj tuaj yeem tsim tag nrho cov tsis dhau los uas koj nyiam.
Kauj Ruam 7
Txuag cov kev hloov pauv mus rau cov ntawv uas siv ua "Cov Ntaub Ntawv" - "Txuag" muaj nuj nqi. Qhib cov ntaub ntawv hauv qhov browser kom tshawb xyuas yog tias cov duab tau raug tsim nyob hauv HTML. Txhawm rau ua li no, nyem txoj nyem rau ntawm cov ntaub ntawv thiab xaiv tshooj "Qhib nrog", thiab tom qab ntawd nyem rau ntawm kab nrog lub npe ntawm koj tus browser. Kev tsim cov duab HTML tiav.