Computers, Software
Yuav ua li cas los tsim HTML-page: kauj ruam yog kauj ruam cov lus qhia, thiab cov tswv yim technology
Koj xav tias yuav ua li cas los tsim HTML-sab? Ua li no, koj yuav tsum siv ib ob peb teev, thiab koj yuav paub qhov tsim ntawm HTML. Thiab koj sau koj thawj nplooj ntawv yuav tsum tau 5 feeb.
HTML stands rau HyperText Markup Language. Txhais, nws txhais tau tias "Hypertext Markup Language". Nws yog ib qho tseem ceeb kom to taub tias HTML - nws tsis yog ib tug programming lus, namely markup site.
Tag nrho cov niaj hnub browsers yuav tau paub txog nws. Ces lawv qhia tias cov ntaub ntawv nyob rau hauv ib tug yooj yim txoj kev rau cov neeg siv, raws li cov ua ntej twb npaj los ntawm tus sau.
Qhov no lus siv tshwj xeeb cim npe. Txhua tag muaj ib tug muaj nuj nqi. Ib tug ntau ntawm lawv. Qhov tseeb tiag mas, koj yuav tsum paub txhua yam. Tab sis rau cov beginner yooj yim kev txawj ntse txaus lawm.
HTML Tsim
Ua ntej koj yuav muaj peev xwm tsim HTML-page, koj yuav tsum paub dab tsi nws yog. Nyob rau hauv cov lus no, muaj ob lub tswv yim: lub caij thiab tag.
Yuav kom qhia kom meej qhov twg lub caij pib thiab kaw kev siv ib qho qhib thiab kaw tag. Nws zoo li no.
Raws li koj tau pom, cov lus qhib thiab kaw tag txawv nkaus xwb los ntawm "/".
Tag nrho cov HTML-ntawv no yog ib tug txheej ntawm cov ntsiab. Muaj tej yam uas yuav tsum tau rau cov qauv ntawm cov ntawv no. Tag nrho cov nplooj ntawv ntsiab lus yuav tsum nyob nruab nrab ntawm ob tug ntawv cim npe thiab html>. Thaum koj sau cov code, coj nws ib tug cwj pwm tam sim ntawd muab tso cia qhib thiab kaw tag.
Tsis tas li ntawd nco ntsoov hais tias cov HTML qauv ntawm cov lus nws muaj nws tus kheej hierarchy. Txwv tsis pub, nws yog hu ua zes. HTML tag yog lub tseem ceeb tshaj plaws, vim hais tias tag nrho cov lwm leej lwm tus yog hauv nws.
Nyob rau hauv HTML, muaj ob tus me nyuam hais:
-
... lub taub hau>; -
.. lub cev>.
Nyob rau hauv lub taub hau seem qhia txog ntau yam kev pab cuam cov lus qhia. Cov ntaub ntawv no yog tso tawm nyob rau hauv lub browser tsis. Piv txwv li, cov txheej txheem rau developers, rau tag nrho cov kev pab cuam, robots thiab tshaj.
Qhov tseem ceeb tshaj - yog tsis muaj cov ntsiab lus.
Lub CEV seem qhia txog cov ntsiab lus ntawm cov ntaub ntawv, uas yuav muab tso tawm kom rau cov neeg siv.
Kawm kom sai li sai tau ua pej xeem thiab lwm cov cim npe, raws li nws yuav ua tau thiab 10 sub-khoom. Nyob rau hauv tas li ntawd, kom yooj yim rau cov nested cim npe ua Indented. Piv txwv li, zoo li no.
Lub taub hau>
Lub cev>
Html>
Yog li ntawd ua uas sib npaug zos tseem ceeb cim npe twb nyob rau tib theem, thiab tus me nyuam - lub "hauv". Yog li ntawd ntau npaum li cas yooj yim nyeem thiab nrhiav rau ib tug daim code. Txwv tsis pub, koj yuav tau txais meej pem. Tab sis rau qhov chaw txuag yog lub taub hau thiab lub cev cim npe yuav ua tau tsis padding. Yog li ntawd tuaj mus rau tag nrho lwm tus muaj tsis muaj dab tsi teg dleb. Txhua tsav txhua yam yog ntshaw kom nyias muaj nyias.
Yuav ua li cas rau tsim ib tug yooj yim HTML nplooj ntawv rau
Sau cov code koj xav tau ib co zoo ntawm editor. Ib tug ntau ntawm lawv. Nrov yog Notepad ++ thiab Adobe Dreamweaver. Koj kuj siv tau cov phau ntawv sau.
Ntawm no yog dab tsi Notepad ++ editor.
Nws yog ib heev neeg siv-phooj ywg editor thiab nws yog dawb. Qhov saum toj no Adobe Dreamweaver yog them. Tsis zoo li editor tsim kev sau ntawv HTML code los ntawm lub ncoo - nyob rau hauv uas tshwj xeeb cim npe tseem ceeb. Yog hais tias nws tsis ci ntsa iab, nws txhais tau tias koj tau sau yog tsis ncaj ncees lawm.
Nyob rau hauv thiaj li yuav phim cov lus ntawm lub teeb, nws yog tsim nyog los qhia kom meej nyob rau hauv qhov chaw.
Cia saib yuav ua li cas los tsim ib qho HTML nplooj nyob rau hauv Notepad. Uas yog, tas cov kev feem thiab ces cia li tsiv mus rau txoj kev tshawb no ntawm lub tag.
Yuav ua li cas rau tsim ib tug web page nyob rau hauv cov phau HTML
Ua ntej, qhib lub phau ntawv.
Ces ntaus nyob rau hauv nws hais tias yog teev nyob rau hauv cov nram no screenshot.
Tau siv mus rau sau nws ob txhais tes, tsis cia li ib daim ntawv. Thaum koj sau koj ob txhais tes, koj zoo cim rau tag nrho cov tag database.
Ces nias rau ntawm cov zaub mov "Txuag ntaub ntawv" thiab hais kom meej cov ntaub ntawv npe, tab sis, nrog rau lub extension .html.
Cov ntaub ntawv yuav tsum qhib nyob rau hauv koj tus browser, thiab txaus siab rau cov kev tshwm sim. Tam sim no koj yuav tsum muaj tseeb yuav ua li cas rau tsim ib tug web page nyob rau hauv cov phau HTML.
Ntiaj teb Consortium W3C
Muaj yog ib lub koom haum xws li cov W3C, uas muaj thiab siv tag nrho cov qauv rau lub Internet. Tag nrho cov browsers yog kev kawm mus rau cov qauv no thiab cov txheej txheem layout (s) rau cov nplooj ntawv nyob rau hauv raws li cov cai no.
Cov hauj lwm lub website ntawm lub developers ntawm HTML, koj yuav nrhiav tau ib lub rooj rau tag nrho cov cim npe thiab cov kev cai hais txog lawv cov kev siv. Nyob rau hauv no tsab xov xwm peb saib cov yooj yim tshaj plaws.
Koj muaj peev xwm xav txog dab tsi tej zaum yuav yog txoj kev? Tag nrho cov no cim npe muaj ib tug pom zoo. Ob peb ntawm lawv:
- Tsis teb los tau tag.
- Txwv tsis pub.
- Dawb paug tag.
- outdated
- Poob lawm.
Tags nyob rau hauv lub HTML
Ua ntej koj yuav muaj peev xwm tsim HTML-page, koj yuav tsum to taub hais tias yuav muaj nyob rau hauv cov kev pab cuam ntawm lub taub hau.
LUB TAUB HAU Nyob rau hauv lub cheeb tsam no muaj yog ob yam tib si yuav tsum tau thiab tsis teb los cim npe. Obligatory tag hais txog header. Nws yog denoted los ntawm
Peb tig mus rau lub CEV seem. Muaj hais tias yog tso tawm kom pom nyob rau hauv lub browser, thiab muaj yog non-tso tawm kom pom. Piv txwv li, cov lus yuav tsis tso tawm rau cov neeg siv. Lawv yuav siv tau rau sau ntawv los yog cov tswv yim rau lwm neeg ua hauj lwm yog tias koj ua hauj lwm nyob rau hauv ib pab neeg.
Lawv xws li cov
Tag nrho cov uas yog nruab nrab ntawm lub , qhov kev pab cuam ntshai nyob rau hauv no txoj kev. Thov nco ntsoov tias koj yuav tsis muab tso rau ib tug saib tag nyob rau hauv lwm tag saib. Vim hais tias raws li sai raws li koj qhib lub .
Ib qho piv txwv ntawm xws li ib enclosure:
continuation ntawm cov thawj saib ->
lub browser yuav lub txiaj ntsim ntawm cov nram qab no
txuas ntxiv rau cov thawj saib ->
Tab sis ib daim ntawm yuav tsis pom. Qhov thib ob qhib tag
Cov lus no nyob rau hauv cov ntawv nyeem
Title qhia tsis tau tsuas yog nyob rau hauv lub taub hau seem siv title tag. Nyob rau hauv lub ntsiab lus teb ntawm cov header yuav tsum muab teev tas. Txij li thaum xwb tus neeg siv pom.
Headlines tuaj nyob rau hauv ib tug ntau yam ntawm theem. Yog li ib tug hierarchy nyob rau hauv cov ntawv nyeem. Equivalent tagnrho, tshooj, paragraphs nyob rau hauv ib phau ntawv.
Nws yog cia li 6 ntau ntau. Lub ntsiab tawm xov xwm yog tsim los
Title H1>. Nyob rau hauv cov nqe lus ntawm kev qhia cov nplooj ntawv hauv cov ntawv nyeem nyob rau hauv H1 cim npe, thiab lub npe yuav tsum tau tib yam. Ntxiv mus, H1 los ntawm ib tug zoo nkauj pom, yuav tsum muaj tsuas yog ib. Tab sis qhov no tsis txhais hais tias tus browser yuav tsis tau lis tom ntej H1. Lawv muaj peev xwm ua tau tag nrho koj xav, tab sis qhov no yog tsis txaus.
Rau subheadings siv cim npe ntawm h2 rau h6. Lawv thiaj li - hu ua title ntawm lub ib, ob, peb, plaub, tsib thiab thib rau theem. Yog li ntawd ua ib tug nested cov ntaub ntawv thiab cov kev faib mus rau hauv pawg.
Nws zoo li no.
pawg lus
Lub ntsiab lus nyob rau hauv cov cai uas koj yuav tsum sau npe rau lub tag
... p>. Nws tuaj los ntawm lo lus "pawg lus". Txhua pawg lus yuav tsum sau cov tag
, thiab tsis sculpt txhua yam nyob rau hauv ib pawg. Tej kab tawg yuav tsis tau. Txhua yam yuav qhia nyob rau hauv ib txoj kab. Rau kev hloov tsheb yuav tsum tau siv
tag.
Thov nco ntsoov tias cov kev hloov ntawm lub tag yog tsis tau kaw. Nws yog ib.
Xav txog rau Piv txwv li nqe Vajluskub no.
Txawv cim npe, nyob rau hauv tas li ntawd rau nws cov "lub npe", muaj ib tug cwj pwm. Piv txwv li, ib pawg lus tag muaj ib tug cwj pwm "kawm tuab si lug", uas yog denoted dlhos. Nws yuav tau teem caij mus rau sab laug, txoj cai, chaw. Hais tias yog, tus kawm tuab si lug ntawm lub sab laug los yog txoj cai los yog chaw.
siv mus
Koj twb zaum twb xav tias: yuav ua li cas los tsim HTML-nplooj ntawv nrog mus? Nyuab txog nws muaj yog tsis muaj dab tsi. Tsim kev mus HTML nplooj yog yooj yim heev. Rau lub hom phiaj no yog ib tug tshwj xeeb lossis . Nws muaj nws yuav tsum tau tej cwj pwm. Kom txuas zoo li no:
Yog hais tias koj tsis qhia kom meej rau ib qho chaw thiab cov ntawv nyeem, ces qhov txuas no yuav puas los yog pom tsis tau tus neeg siv.
xaus
Muaj ib tug ntau ntawm cov cim npe, thiab txhua tus nws muaj nws tus kheej txheej cwj pwm. Tom qab nyeem ntawv cov ntaub ntawv no, koj yuav tsum to taub yuav ua li cas rau tsim ib tug web page HTML.
Nyob rau hauv thiaj li yuav nthuav lawv cov kev paub nyob rau hauv cov cheeb tsam no, koj yuav tsum nyeem ntau phau ntawv thiab siv cov official siv cim npe rau HTML, uas yog nyob rau ntawm qhov chaw W3C. Yog hais tias koj tsis txhob siv tseg tshiab directory cov lus sau phau ntawv, koj yuav ua nyuaj rau ua ib tug kws nyob rau hauv daim teb no.
Similar articles
Trending Now