Yuav Ua Li Cas Qhia Lub Cim Tau

Cov txheej txheem:

Yuav Ua Li Cas Qhia Lub Cim Tau
Yuav Ua Li Cas Qhia Lub Cim Tau

Video: Yuav Ua Li Cas Qhia Lub Cim Tau

Video: Yuav Ua Li Cas Qhia Lub Cim Tau
Video: Win Vang Qhia Txog Nws Tus YOUTUBE Ib Hli Tau Nyiaj Li Cas..? 2024, Hlis ntuj nqeg
Anonim

Lub vev xaib ntawm nplooj ntawv web yuav tsum muaj qhov ntsuas qhov cim cim rooj rau kev siv los ntawm qhov browser thaum tso tawm cov ntsiab lus. Txoj kev uas yuav tsum tau ua no tau piav qhia nyob hauv W3C (World Wide Web Consortium) tus qauv.

Yuav ua li cas qhia lub cim tau
Yuav ua li cas qhia lub cim tau

Cov Lus Qhia

Kauj ruam 1

Txhawm rau taw qhia qhov encoding ntawm daim ntawv HTML, META tag tau siv, uas yuav tsum tau muab tso rau sab hauv kab taub ntawm nplooj ntawv cov code. Qhov block tus cim nrog thiab cov cim npe hu ua block block. Txhawm rau kom qhov meta tag no yuav pom los ntawm qhov browser ua tus taw qhia rau lub rooj ntawv encoding, tus cim "codeword" yuav tsum tau muab tso rau hauv nws cov ntsiab lus ntaus cim, thiab qhov txuas mus rau qhov xav tau yuav tsum tau teev tom qab kev kos npe sib npaug. Piv txwv li, nws yuav zoo li qhov no: Ntawm no yog qhov txuas mus rau lub rooj windows-1251 code, muaj cov tsiaj ntawv ntawm Lavxias teb chaws cov niam ntawv - nws yog nws uas yog siv ntau tshaj plaws hauv Lavxias-hais lus hauv Is Taws Nem. Koj yuav tsum tau sau koj tus nqi tom qab charset =. Qhov no tuaj yeem yog, piv txwv li, UTF-8 Unicode cim lub rooj, lossis lwm yam encoding muaj Cyrillic cov cim (koi8-r, iso-ir-111, koi8-u, x-cp866, iso-8859-5, x-mac- cyrillic, ibm855). Yog hais tias daim ntawv yog sau raws li XHTML cov qauv, tom qab ntawd ntxiv ib qho chaw thiab cov luaj li ("/>") ua ntej lub cim kawg (">"). Tag nrho daim ntawv no yuav tsum tau muab tso ze li qhov ze tau rau thaum pib ntawm lub taub hau ib feem ntawm daim ntawv (). Feem ntau, nws ua raws ib qho txuas.

Kauj ruam 2

Txhawm rau ntxiv qhov ntsuas qhov encoding uas lub browser yuav tsum siv thaum tso tawm cov ntsiab lus ntawm cov ntaub ntawv, qhib nplooj nplooj los kho kom raug. Hauv HTML qhov chaw, koj yuav tsum xub txiav txim siab qhov qauv syntax twg yog siv los sau cov cim npe. Cov ntaub ntawv no feem ntau tso rau hauv kab thawj, hauv kab ntawv pib nrog <! DOCTYPE … Nyob ntawm seb tus qauv tau raug txheeb xyuas hauv nws (XHTML lossis HTML), koj yuav tsum kho cov meta tag code los qhia qhov encoding. Nrog txoj kab ntawm cov code npaj rau kev nkag mus, nrhiav tus cim, thiab ntawm kab ntxiv, ntxiv koj cov meta tag. Yog tias tsis muaj ib qho cim npe ntawd hauv koj daim ntawv, tom qab ntawd ntxig qhov cim tau cov ntsiab lus tom qab daim pib. Tom qab ntawv cawm nplooj edited.

Kauj ruam 3

Qhov cim yuav tsum tau sau tseg nyob rau hauv cov ntaub ntawv sab nrauv yog tias lawv muaj cov ntsiab lus uas siv cov cim hauv teb chaws. Ntxiv cov lus txhais no rau thawj kab ntawm koj daim CSS: @charset "windows-1251"; Tau kawg, koj yuav tsum hloov lub windows-1251 nrog koj tus nqi.

Kauj ruam 4

HTML kuj tseem muaj txoj hauv kev los qhia qhov sau cov ntawv ntawm cov ntawv uas lub ntsiab lus siab txuas rau. Tus pas nrig teev tus qauv siv tau rau qhov no. Piv txwv li: Yooj Yim!

Pom zoo: