ComputersProgramming

Ib qho piv txwv ntawm ib qho kev HTML nplooj thiab tej ntsiab cai ntawm

Yees ntau yam lus, tab sis cov lus ntawm HTML yog ib tug ntawm cov tshwj xeeb tshaj plaws thiab vosstrebovan. Txij li thaum nws yuav ib tug ntau ntawm lwm yam tseem ceeb thawj kauj ruam nyob rau hauv lub cajmeem. Ntau yog muaj, thaum nyob rau hauv lub minds ntawm tus tsim tawm tam sim no kev paub txog markup lus - HyperText Markup Language (HTML).

Nyob rau hauv qhov tseeb, nyob rau hauv HTML, muaj yog tsis muaj dab tsi yooj yim, thiab nyob rau hauv ib tug ob peb feeb tag nrho cov feem ntau nyob deb los ntawm lub cajmeem thiab lub Internet neeg yuav txaus siab rau lub tsev lag luam ntawm HTML-nplooj ntawv nyob rau hauv cov phau. Noteworthy piv txwv, simplicity, tseeb, siv tau rau txhua leej txhua tus.

piav

HTML ntaub ntawv - ib tug ib sab site, txawm hais tias qhov no yog debatable, tab sis yog dab tsi yog ib tug cov ntaub ntawv rau ib page, rau ib tug pib nws yog ib qhov tseeb.

HTML ntaub ntawv yuav pib nrog ib DOCTYPE header uas qhia txog hais tias hom ntawm cov ntaub ntawv - HTML. Tag nrho cov nplooj ntawv lub ntsiab (cim npe) yog qhia tsis pub dhau lub nkhaus. Txhua khub ( "<" thiab ">") muaj xws li ib tug lossis HTML. Feem ntau HTML cim npe paired, uas yog, rau txhua txhua «tag» muaj «/ lossis». Neb ob leeg yeej muab ntim rau hauv lub nkhaus. Muaj yog ib tug hluas tag, ntawm uas nrov tshaj plaws «br /» - kev hloov mus rau lub tom ntej no kab.

Qhov loj tshaj lossis nyob rau hauv cov ntaub ntawv - nws kuv tus kheej HTML, uas muaj xws li tsuas yog ob tug lossis: taub hau thiab CEV. Nyob rau hauv thawj cov ntaub ntawv, sib txawv specification yog indicative ntawm kev mus rau lwm ev page cov ntaub ntawv tej zaum yuav tam sim no PHP thiab JavaScript scripts. Nyob rau hauv lub thib ob nplooj ntawv sau cov ntsiab lus. Tsis tas li ntawd nyob rau hauv daim ntawv ntawm cov npe thiab scripts.

Tej yam yooj yim HTML-page

Piv txwv li ntawm tsim xws nplooj ntawv yog qhia nyob rau hauv tsab xov xwm hauv qab no. Xav txog nws kom zoo zoo.

LUB TAUB HAU seem

Lub hom phiaj tseem ceeb TAUB HAU lossis - ib tug general piav qhia ntawm cov nplooj ntawv thiab cov kev scripts, txawm hais tias tus tom kawg - cia li ib tug txheeb ze tswvyim. Feem ntau muaj hniav loj tseem ceeb rau tsuas yog ob tug no:

  • keywords thiab cov hauj lwm ntawm cov nplooj ntawv;
  • mus rau lwm yam ntaub ntawv (* .css thiab * .js).

Yuav kom tso saib cov ntsiab lus ntawm cov nplooj ntawv cov ntsiab lus ntawm tshooj no tsuas muaj indirect tseem ceeb vim hais tias nws qhia tias qhov twg ib txhia lwm yam ntaub ntawv muaj CSS kev cai rau npe thiab lwm yam scripts lus.

HTML-nplooj muaj ib tug title (TITLE), uas yog tso tawm thaum yog ib tug qhua theem koj nas dua cov tab nyob qhov twg cov nplooj ntawv yog qhib. Qhov no yog ib qho tseem ceeb, vim hais tias nws yuav ua rau cov nplooj ntawv ntau npaum li cas presentable, yooj yim rau hais tias, kos npe tshwmsim cov ntawv nyeem.

META-cim npe yog ib qho tseem ceeb nyob rau hauv web programming nyob rau hauv Feem ntau, tab sis thaum nws yuav tsum tau lub creation ntawm HTML-nplooj ntawv nyob rau hauv ib phau ntawv, ib qho piv txwv ntawm undesirable swb redundant lug.

Nyob rau hauv LINK thiab tsab ntawv mus yuav tsum tau them tshwj xeeb mloog. Tus thawj yog hais txog mus rau ib tug qhov chaw nyob qhov twg muaj ib tug CSS stylesheet cov ntaub ntawv, lub thib ob - qhov chaw ntawm lub JavaScript-code ntaub ntawv. Tej mus yuav tau teem caij.

Yog hais tias koj siv scripts yuav tsum tau kho raws li ib tug HTML paub yuav ua muaj zog, koj yuav tsum tau them nyiaj mloog tam sim ntawd nyob rau hauv kev lam style los xij. Lub CSS cov ntaub ntawv yog, nyob rau hauv particular, cov kev cai ntawm kev cuv npe ntawm HTML cim npe.

seem CEV

Nyob rau hauv qhov tseeb, ib tug qauv page HTML - qhov no yog qhov CEV seem. Nws yog ntawm no uas muaj tag nrho cov ntaub ntawv, tag nrho cov ntsiab lus page. Tag nrho cov ntaub ntawv yog hais nyob rau hauv daim ntawv ntawm cov npe thiab scripts, xws li inserting ib JavaScript-code los yog daim ntawm lub PHP-kev pab cuam.

Nws yog ib qho tseem ceeb kom paub tias cov piv txwv ntawm HTML nplooj ntawv Web site nyob rau hauv qhov browser thiab tib yam piv txwv nyob rau hauv ib phau ntawv editor xws li notepad, qhov no yog tsis tau tib yam tshaj plaws. Nyob rau hauv rooj plaub thawj uas peb yeej npaj HTML phau ntawv nyob rau hauv uas tag nrho cov scripts tseg. Piv txwv li, PHP twb ua raws li nws ib feem thiab tsim es tsis txhob ntawm cov cai nyob rau txoj cai qhov chaw lub cim npe. JavaScript kuj ua tiav raws nws lub hom phiaj, tab sis yog hais txog nws tsis tau yuav tsum tau ib daim kev sib tham.

HTML - nws cim npe es tsis txhob ntawm scripts. Thaum kawg, tsuas yog lub ntsiab lus ntawm cov nplooj ntawv tso tawm nyob rau hauv lub browser, tab sis nws tag. Tsis PHP-code yog tsis muaj.

JavaScript yog nyob rau hauv ib tug tshwj xeeb txoj hauj lwm, nws saib xyuas - mus ua hauj lwm cov nplooj ntawv, tsis tsuas yog nyob rau khau raj lub sij hawm (overload), tab sis nyob rau hauv lub sij hawm thaum cov nplooj yog nyob rau hauv lub qhua browser, thiab cov kev tshawb fawb nws.

Ib tug piv txwv yooj yim ntawm code HTML-page (tsuas yog CEV seem) yog qhia hauv qab no.

Ib tug qhua browser nws zoo raws li qhia hauv qab no.

twb tsis teev nyob rau hauv lub code yuav tsum zoo li lub ntsiab uas coj lub browser. Tag nrho cov tsim yog pom nyob rau hauv lub CSS kev cai. Nyob rau hauv cov ntaub ntawv no, Mcss / scPhpWordRW.css cov ntaub ntawv uas twb hais los (saib. Cov thawj heev piv txwv ntawm ib daim ntawv HTML).

Tsis zoo li HTML, CSS ntsiab yog yooj yim, muaj yog heev siv tau cov kev cai thiab lawv tus xov tooj yog me me, thaum cov piv txwv ntawm cov creation ntawm HTML-nplooj ntawv tsis tau dab tsi lwm yam tshaj li notepad. Txhua yam yog heev puas siv tau rau tam sim ntawd kev loj hlob:

Qhov no qhia tau hais tias yuav ua li cas yooj yim nws yog piav tag scLogo_vDoc, thiab qhov no piav qhia yog hais tias nyob rau hauv ib tug ib txwm lub xeev ntawm cov tag qhia ib daim duab vDoc-logo.png, thiab thaum twg lub nas yog dua nws - tso tawm kom pom vDoc-logo-h.png.

Tus qauv ntawm lub HTML piav

Language tsis koom nrog nqa tawm ib yam ntawm cov qauv thiab syntax ntawm lub tswvyim no yog heev txheeb ze. Yog tsis muaj cov tsiaj ntawv, tab sis muaj ntau ntau ntawm lub sij hawm. Cov yuav tsum muaj lub hauv paus ntawm hypertext yog hais tias muaj yog ib tug keeb (tag) uas yog kom muaj ib lub npe.

Lub npe ntawm cov ntaub ntawv, cov tag khub, muaj li ntawm kom lub npe (tagName) thiab lub nkhaus ( «<» + tagName + «>»), yog hais tias peb yog tham txog thaum pib ntawm lub tag, thiab «», yog hais kaw nws kawg.

Piv txwv li ntawm HTML nplooj ntawv piav txog cwj pwm nyob rau hauv cov ntawv nyeem hauv qab no.

Lub lossis yuav muaj cwj pwm, ces lawv muab tso rau los ntawm ib qhov chaw tom qab lub tag lub npe ua ntej rau hauv lub kaw lub bracket ">". Cwj Pwm, yog hais tias lawv muaj lub tag yog kaw tsuas yog nyob rau hauv thaum pib. Cov ntsiab lus ntawm cov tag yog tias uas dag nruab nrab ntawm cov pib lossis thiab qhov kawg ntawm nws.

Tag nrho cov HTML ntsiab lus piav

HTML tso cai rau koj los mus piav txog lub thaiv thiab inline ntsiab. Thawj nyob ib yam cheeb tsam nyob rau hauv lub qhov rais browser yuav positioned kiag li, uas yog nyob rau hauv txoj cai qhov chaw nyob rau hauv lub teb ntawm cov zaub HTML-nplooj ntawv, thiab muaj ib txog kev loj.

Inline ntsiab feem ntau tshwm sim ib xov, uas yog, raws li tau teev nyob rau hauv cov nplooj ntawv tej ntaub ntawv, thiab tso tawm ntawm qhov screen. Cov zaub ntawm tag nrho cov txaus yuav tau pawg thaum cov nplooj load tshwm sim. Nyob rau qhov kev tso kawm, visibility, thiab lwm yam khoom ntawm tus thaiv cov ntsiab yuav tau pawg ntawm txhua lub sij hawm ntawm JavaScript-code.

Nyob rau hauv tas li ntawd mus rau lub yooj yim hais, HTML muaj rau piav qhia txog lub rooj thiab cov ntaub ntawv. Cov ntsiab yog heev npaum li cas nyob rau hauv coob nyob rau hauv lub "txhua hnub qhov chaw lub tsev."

Hauj lwm ntawm lub rooj: tags COV, TR, TD

Thaum lub rooj tag yuav siv tau los tsim ib lub rooj, qhia kom meej ib tug xov tooj ntawm kab thiab TR nyob rau hauv ib tug kab rau ib tug xov tooj ntawm TD hlwb. Nyob rau hauv sib piv rau li ib txwm rooj ntawm lub koom haum, vim qhov HTML-markup tabular lub koom haum tag rau qhov no tshaj tawm, vim hais tias yog hais tias tus tsim tawm xav kom muaj ib lub rooj nyob rau hauv uas lub xov tooj ntawm kab nyob rau hauv tag nrho cov kab ntawm tib yam, ces nws yuav tsum ua raws li ntawd rau koj tus kheej.

Lub principled txoj hauj lwm ntawm HTML: ua xijpeem yog, tab sis tsis muaj dab tsi uas yog tsis to taub. Nyob rau hauv tej zaum nws tsis yog li ntawd ib qho tseem ceeb rau tus xov tooj ntawm txhua rau txhua leej ntawm lub rooj, tab sis, yog hais tias koj xav mus ua ib tug sib tshuam uake hlwb horizontally los mas, nws yog tsim nyog los suav tag nrho cov zoo zoo heev.

Piv txwv li HTML nplooj ntawv nrog ib tug kev piav qhia txog ib tug yooj yim rooj graphically qhia nyob rau hauv tsab xov xwm.

Ntawm no yog ib lub rooj uas qhia qhov luaj li cas ntawm peb kab los ntawm peb cov kab, nrog rau thawj kab lossis TH siv es tsis txhob ntawm TD tag - sab header. Tshwj xeeb yog distinguished no ob cim npe tsis muaj, tab sis nws yog tej zaum yuav siv lub thawj kom paub qhov txawv nruab nrab ntawm tus thawj kab ntawm lub rooj, thiab nyob rau hauv CSS rau TH, koj muaj peev xwm muab koj tus kheej style, uas distinguishes nws los ntawm lwm yam TD.

Hauj lwm daim ntawv: DAIM NTAWV tag, tawm tswv yim

Daim ntawv - qhov no yog feem ntau cov demanded ib feem ntawm lub HTML-cim npe. Siv ntaub ntawv yuav kis ntaub ntawv. Ua tau, cov nplooj ntawv - qhov no zaub ntaub ntawv, tab sis rau hauv daim ntawv - lub tswv yim.

Piv txwv li HTML nplooj ntawv nrog ib tug kev piav qhia txog ib tug yooj yim daim ntawv:

Siv cov ntaub ntawv ntau npaum li cas, tab sis lub ntsiab nta muaj raws li nram qab no. Koj yuav tau qhia lub tswv yim teb, koj yuav tsum muab lawv tsim thiab kev tshwm sim handlers rau lub tsom xam ntawm cov neeg siv cov tswv yim. Koj yuav tau qhia rau ib tug thaum teb thiab kis cov lus qhia los ntawm cov nplooj ntawv tom qab. Koj muaj peev xwm xaiv ntaub ntawv kis tau tus mob khawm, nias uas initiates cov ntaub ntawv hloov lwm lub tsev txheej txheem.

siv HTML

Yuav kom paub hypertext lus - ib tug indispensable mob rau tej kev ua hauj lwm specialization nyob rau hauv lub teb ntawm Internet programming, tab sis, yog hais tias koj xav mus sau ib qho kev pab nyob rau hauv PHP los yog JavaScript, ces paub HTML + CSS xav tau zoo kawg nkaus.

PHP lus tau raug pom tias nyob rau hauv lub yav dhau los piv txwv. PHP sau rau cov neeg rau zaub mov, vim hais tias ib nplooj ntawv nrog daim ntawv no dhau los ntawm tus neeg rau zaub mov mus rau lub browser nrog lub teb sau. Nyob rau hauv kev, TestOnBlur zog hais nyob rau hauv lub tag tswv yim (onblur kev tshwm sim handler), tau txais tag nrho cov tsis nyob rau hauv daim ntawv ntawm cov ntawv luam liaj teb.

Qhov browser sau JavaScript, thiab kom zoo zoo ua hauj lwm cov ntaub ntawv xa khawm rov qab mus rau lub neeg rau zaub mov, uas yog, tsim :. Onclick = jQuery ( '# rau') val ( 'lub tawb nqa khoom'), nws yog tsim nyog los paub tsis tau tsuas yog hais txog dab tsi lub jQuery, tab sis li cas #ad hais, val, lub tawb nqa khoom. Ntau precisely, nws yog tsim nyog los paub qhov yooj yim HTML cim npe thiab cov kev cai thov mus rau lawv tus CSS yeej.

Qhov no yog txaus rau sai sai tsa lub peev xwm ntawm tej specialization nyob rau hauv lub cheeb tsam ntawm Internet programming.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 hmn.birmiss.com. Theme powered by WordPress.