Yuav ua li cas txuas rau hauv HTML?

Cov txheej txheem:

Yuav ua li cas txuas rau hauv HTML?
Yuav ua li cas txuas rau hauv HTML?
Anonim

Websites, blogs, web pages - twb paub cov ntsiab lus hauv peb lub sijhawm. Nrog rau txoj kev loj hlob ntawm Is Taws Nem, cov chaw rau hosting lub vev xaib tau dhau los ua neeg nyiam heev, thiab qhov no tsis yog qhov xav tsis thoob: rau qee tus neeg, muaj lawv tus kheej lub vev xaib yog qhov tsim nyog, rau lwm tus nws yog kev lom zem zoo nkauj. Hauv thawj kis, peb feem ntau yog tham txog cov tuam txhab, cov tuam txhab, cov lag luam ntiag tug, thaum lawv tshaj tawm cov khoom lossis kev pabcuam hauv kev thov. Qhov thib ob yog hais txog bloggers.

Dhau li ntawm qhov no, muaj cov neeg siv Is Taws Nem yooj yim tshawb nrhiav cov ntaub ntawv, nyeem blogs, saib yeeb yaj kiab thiab lwm yam.

Tsim kom muaj lub vev xaib zoo, muaj ntau yam kev xaiv. Peb yuav tsom mus rau lub vev xaib programming los ntawm HTML.

HTML yog dab tsi

HTML stands rau Hyper Text Mark-Up Language. Txhais los ntawm Askiv, qhov no txhais tau tias "Hypertext Markup Language".

Hauv lwm lo lus, HTML yog txheej txheej ntawm cov lej uas koj tuaj yeem tsim cov ntsiab lus tseem ceeb ntawm lub xaib, nws cov ncej, zoo liYuav ua li cas cov lus ua los ntawm kab lus.

HTML cov lej yog sau tshwj xeeb hauv cov tsiaj ntawv Latin thiab hu ua cov cim npe, thiab txhua tus lej raug kaw hauv lub kaum sab xis. Qee lub cim tau ua khub, qee qhov tsis ua khub.

Paired txhais tau hais tias lawv yuav tsum tau siv ua khub yam tsis tau poob. Piv txwv li, daim ntawv qhib qhia qhov chaw pib ntawm nplooj ntawv web, thiab daim ntawv kaw qhia qhov twg nws nres. Lub tom kawg txawv ntawm qhov qub los ntawm qhov muaj tus cim slash tom qab qhib lub kaum sab xis. Piv txwv li, yog qhib tag,yog qhov kaw.

Unpaired tag tsis xav tau tus khub.

Ntau lub cim tuaj yeem muaj tus cwj pwm - cov ntsiab lus ntxiv uas muab qee lub ntsiab lus tshwj xeeb. Piv txwv li, tag.

Web tsim
Web tsim

Qhov twg HTML siv

Qhov kev nkag siab classic ntawm qhov twg HTML xav tau yog lub vev xaib tsim.

Hauv kev xyaum, qhov no yuav txaus, txij li HTML tso cai rau koj los tsim cov ntsiab lus tseem ceeb ntawm lub xaib, cov ntawv qhia zaub mov (suav nrog ntau qib), teeb tsa keeb kwm yav dhau los, ntxig cov ntawv, duab, suab, yees duab, kho fonts thiab ntau ntxiv.

Txawm li cas los xij, muaj lwm yam lus uas tso cai rau koj ntxiv cov ntsiab lus nthuav dav thiab feem ntau tsim nyog rau nplooj ntawv web:

  • CSS teeb tsa cov qauv rau tag nrho qhov chaw yam tsis tas yuav tsum tau sau cov qauv ntawm tus kheej cov ntsiab lus siv cov cim npe - xim thiab font ntawm cov ntawv, piv txwv li.
  • Cov lus sau tso cai rau koj los tsim thiab kos cov khoos phis tawj me (scripts) ntawm qhov chaw, xws libanal aesthetic yam (hloov cov xim ntawm qhov txuas thaum hovering nrog tus nas) thiab xaus nrog kev ua haujlwm (sau cov neeg siv email chaw nyob, xov tooj).
  • Nrog PHP koj tuaj yeem tsim koj tus kheej phau ntawv qhua lossis kev tawm tswv yim.

Tseem HTML yog siv los tsim cov email rau kev faib tawm.

internet mailing list
internet mailing list

Dab tsi yog qhov txuas

Lawv tso cai rau koj mus rau lwm nplooj ntawv web, ob qho tib si sab hauv thiab sab nraud.

HTML txuas yog nquag siv:

  • Tau mus rau qhov chaw pabcuam sab nraud.
  • Txawm mus hla cov nplooj ntawv hauv qhov chaw.
  • mus rau google forms.

Ib qhov txuas mus rau qhov chaw hauv HTML kuj tau qhia ntau zaus, tshwj xeeb tshaj yog thaum luam cov khoom los ntawm lwm qhov chaw, koj yuav tsum qhia tus sau. Txwv tsis pub, kev luam tawm yam tsis muaj kev cuam tshuam tuaj yeem poob rau hauv cov ntsiab lus ntawm kev ua txhaum cai lij choj, cov ntsiab lus tub sab nyiag thiab thim rov qab. Tsis tas li ntawd, kev siv qiv, cov ntaub ntawv tsis sib xws txo qis SEO kev ua tau zoo, thiab qhia qhov txuas mus rau qhov chaw txo qhov kev pheej hmoo.

Type of links

Nyob rau hauv lub ntsiab lus classical, qhov txuas yog qhov chaw nyob ntawm lub vev xaib uas koj tuaj yeem mus tau los ntawm nyem rau ntawm nws.

hom kev sib txuas
hom kev sib txuas

Dhau li ntawm qhov no, muaj cov kab txuas txuas ntxiv: ntawv thiab cov duab. Hauv cov xwm txheej no, qhov txuas HTML yog "pob ntseg" hauv qee kab lus (lo lus) lossis duab, thiab txhawm rau ua raws nws, koj yuav tsum nyem rau ntawm cov ntawv lossis duab.

Lwm hom kev txuas:

  • Unvisited - ib qhov txuas uas tseem tsis tau nyem rau ntawm lub sijhawm tshwj xeeb. Piv txwv li, yog tias koj ua raws li qhov txuas no nag hmo, ces muab koj lub computer kaw, thiab muab nws rov qab rau hnub no, tam sim no qhov txuas tsis tau mus ntsib dua, vim qhov kev sib tham tshiab tau pib.
  • Active - nyob rau hauv lub xeev no, qhov txuas tau txais kev cawmdim rau lub sijhawm luv luv: lub sijhawm ntawm kev nyem rau ntawm qhov txuas thiab ua raws nws.
  • Visited - ib qhov txuas uas twb tau mus xyuas tsawg kawg ib zaug hauv ib zaug.

Rau cov ntawv txuas tsis tu ncua, cov neeg tuaj saib yuav hloov xim tshwj tsis yog tau teev tseg.

Ib daim duab hyperlinked tsis hloov nws qhov tsos, txawm tias nws tau mus xyuas lossis tsis.

Yuav ua li cas ntxig qhov txuas tsis tu ncua

Ntau lub vev xaib pom qhov chaw nyob raws li qhov txuas, tam sim ntawd ua rau nws nyem tau thiab tseem ceeb nrog xim. Piv txwv li, yog tias qhov chaw nyob xa hauv tus tub txib lossis e-mail, nyem rau ntawm nws, koj tuaj yeem mus rau qhov chaw.

Thaum tsim lub vev xaib koj tus kheej siv HTML, koj yuav tsum ntxig qhov txuas uas siv lub cim tshwj xeeb. Nws yuav zoo li no: lub vev xaib chaw nyob. Txuas cov ntawv hauv HTML yuav tsum tau teev nyob rau hauv tag nrho, nrog raws tu qauv.

Yuav ua li cas ntxig ib cov ntawv hyperlink

Nws tau hais ua ntej tias cov ntawv nyeem hyperlink ua haujlwm zoo ib yam li qhov txuas tsis tu ncua, tab sis zoo li zoo nkauj dua: tsis yog qhov chaw nyob, uas feem ntau tsis tsim nyog ntev, ib lo lus lossis kab lus qhia. Piv txwv li, hauv kab lus "Nrhiav cov ntaub ntawv ntawm no", koj tuaj yeem nkaum qhov txuas hauvlo lus "no". Nws yuav raug qhia thiab nyem rau ntawm nws yuav coj tus neeg siv mus rau qhov chaw xav tau.

inserting ib tug hyperlink
inserting ib tug hyperlink

Yuav ua li cas rau HTML txuas tau tau tham ua ntej lawm. Koj tuaj yeem ntxig cov ntawv nyeem hyperlink siv tib lub cim npe. Qhov txawv tsuas yog tias koj yuav tsum qhia meej ntawm cov ntawv cim npe hauv qab uas qhov txuas yuav raug muab zais: cov ntawv pom.

Yuav ua li cas ntxig ib daim duab hyperlink

Nws nyuaj me ntsis ntawm no. Peb siv tib lub cim, tab sis tsis yog cov ntawv nyeem, koj yuav tsum qhia txoj hauv kev rau daim duab.

Txoj kev yog qhov chaw ntawm daim duab. Yog tias daim duab (daim duab) nyob rau ntawm qhov kev pabcuam sib koom ua ke, ces koj yuav tsum tau qhia tag nrho cov folders raws txoj kev mus rau daim duab los ntawm kev sib tw. Koj tuaj yeem suav nrog qhov txuas mus rau ib daim duab yog tias ua tau.

To tag

ntxiv rau src, lwm yam khoom siv kuj tseem siv tau, tso cai rau koj los kho qhov siab, dav thiab qhov chaw ntawm daim duab thiab ntau ntxiv. Qee tus ntawm lawv:

  • Src - qhia txoj hauv kev rau daim duab.
  • Lowsrc - zoo ib yam rau tus cwj pwm yav dhau los, tab sis tau teev tseg rau cov duab tsis zoo.
  • siab - duab qhov siab.
  • Dav - nws qhov dav.
  • Alt - duab piav qhia. Thaum koj hover dua ib daim duab lossis daim duab, cov ntawv sau qhia hauv tus cwj pwm no yuav tshwm sim.
  • Ciam teb - txiav txim siab qhov tuab ntawm ciam teb ib puag ncig daim duab.

Tus cwj pwm tau teev tseg tom qab tag thiab suav nrognws muaj pes tsawg leeg. Tus cwj pwm yuav tsum ua raws li nws tus nqi. Piv txwv li, rau cov cwj pwm "qhov siab" lossis "dav" (qhov siab, dav) qhia qhov siab ntawm daim duab ntawm nplooj ntawv web. Chav ntsuas ntawm qhov ntsuas yog pixels, tshwj tsis yog tias tau teev tseg.

Nws yuav zoo li no: <a href="web page address"

. Cov cwj pwm no yuav pab teeb tsa qhov loj me rau daim duab. Ciam teb pab tsim kom pom ciam teb ib ncig ntawm daim duab.

ua raws li qhov txuas
ua raws li qhov txuas

Cov yam ntxwv saum toj no siv nyias rau cov duab ntxig tag. Piv txwv li:.

Dab tsi yog qhov txuas txuas

Tsim kev txuas thauj tog rau nkoj yog ib qho txuj ci tseem ceeb heev. Feem ntau yuav tsum tau nteg tawm ib nplooj ntawv web nrog cov ntawv ntev ntev los yog nrog ob peb ntu ntawm ib nplooj ntawv. Hauv qhov no, koj tuaj yeem pib tam sim nrog cov npe txuas mus rau ntu ntu ntawm cov ntawv nyeem lossis nplooj ntawv web, thiab thaum koj nyem rau ntawm lawv, tus neeg siv yuav mus ncaj qha rau ntu thov.

Tsim cov txuas txuas yuav xav tau kev siv cov cim cim ntau dua li lwm hom kev txuas.

txuas thauj tog rau nkoj
txuas thauj tog rau nkoj

Ua ntej, koj yuav tsum teeb tsa tus nqi tag nrho rau txhua qhov thaiv ntawm cov ntaub ntawv lossis ntu ntu ntawm cov ntawv siv tus cwj pwm saum toj kawg nkaus, thiab tom qab ntawd koom nrog qhov sib txuas.

Lawv cov yam ntxwv yog qhov dav dua, yog li nws raug nquahu kom ua ntej tus tswv tsim cov kev sib txuas yooj yim, thiab tom qab ntawd txav mus rau kev tsim cov txuas txuas.

Tips

Qhov chaw ntawm ntau yam thaiv cov ntaub ntawv ntawm nplooj ntawv web
Qhov chaw ntawm ntau yam thaiv cov ntaub ntawv ntawm nplooj ntawv web

Kev pab los ntawm kev paub dhau losprogrammers:

  • Koj tuaj yeem ua nws kom cov ntaub ntawv hais txog qhov txuas tau tshwm sim ntawm hover hauv HTML. Rau qhov no, tus cwj pwm alt, uas peb kuj siv rau cov duab nraaj, tuaj yeem ua ke.
  • Nws muaj peev xwm ua tau ib daim ntawv teev cov kev sib txuas siv HTML. Tshwj xeeb, qhov no tuaj yeem pab tau rau cov txuas txuas txuas, nrog rau thaum koj xav tau los ua cov npe ntawm cov vev xaib uas tuaj yeem ua raws li qhov txuas ncaj qha los ntawm nplooj ntawv web tam sim no.
  • Nrog kev pab ntawm CSS thiab JavaScript, nrog rau qee qhov haujlwm HTML, koj tuaj yeem tsim cov qauv sib txawv ntawm cov ntawv txuas thiab hyperlinks dua li niaj zaus. Piv txwv li, thaum koj hla ib qhov txuas, nws tuaj yeem hloov nws cov xim thiab rov qab mus rau yav dhau los thaum tus cursor nyob deb ntawm nws. Qhov no tuaj yeem ua tiav nrog kev cai JavaScript tsab ntawv. Tsis tas li ntawd, cov xim txuas tuaj yeem teeb tsa rau lwm yam uas tsis yog xiav rau qhov tsis tau mus xyuas lossis ntshav rau kev mus xyuas. Nov yog txoj haujlwm ntawm CSS.
  • Tsis txhob tsim txom cov txuas. Ib nplooj ntawv web uas muaj ntau qhov txuas tsis tsim nyog zoo li sloppy thiab sloppy.
  • Nco ntsoov tias tus neeg siv nkag siab tias qhov sib txuas nrog cov duab yog cov duab tiag tiag, thiab tsis yog duab xwb.

Zoo kawg

Nws yooj yim heev los txuas rau nplooj ntawv hauv HTML. Nws yog ib qho tseem ceeb kom ua raws li tag nrho cov ntsiab lus tseem ceeb ntawm cov lus no, vim tias txawm tias qhov yuam kev me me tuaj yeem ua rau qhov tseeb tias yuav tsis muaj qhov tshwm sim, thiab cov cai yuav tsis ua haujlwm.

Pom zoo: