Yuav Ua Li Cas Rau Indent Html

Cov txheej txheem:

Yuav Ua Li Cas Rau Indent Html
Yuav Ua Li Cas Rau Indent Html

Video: Yuav Ua Li Cas Rau Indent Html

Video: Yuav Ua Li Cas Rau Indent Html
Video: 16 HTML et CSS: Cas pratiques d'utilisation des liens 2024, Kaum ib hlis
Anonim

Cov HTML markup lus yog lub luag haujlwm rau tso tawm cov ntawv nyeem thiab lwm cov nplooj ntawv ntsiab lus hauv qhov browser window. Siv cov cuab yeej txheem, koj tuaj yeem hloov kho qhov pom ntawm nplooj ntawv, ntxiv kev nkag rau thiab cov qauv lus.

Yuav ua li cas rau indent html
Yuav ua li cas rau indent html

Cov Lus Qhia

Kauj ruam 1

Txhawm rau tsim cov kab lus indentation, koj tuaj yeem siv kev koom tes ntawm CSS hauv HTML code, uas yuav ua rau kom muaj kev cuam tshuam zoo dua. Ua li no, hauv cov kab ntawv

suav nrog cov ntawv nyeem-indent xaiv:

Kab lus

Tus lej no tsim kab lus ib kem 15 pixels ntawm sab laug ntawm lub vijtsam.

Kauj ruam 2

Koj tuaj yeem hloov kho lub padding los ntawm kev tsim cov ntxhuav thiab siv cov cellpadding thiab cellspacing tsis. Thawj tus cwj pwm txiav txim siab qhov kev ncua deb ntawm lub ntsiab lus mus rau lub cell tus ciam teb, thiab cellspacing yuav pab kho qhov kev ncua deb ntawm hlwb. Txhawm rau kev cuam tshuam cov zaub ntawm rooj ciam teb, siv ciam ciam sib npaug sib npaug:

Cov ntsiab lus ntawm tes

Txoj cai no yuav tsim ib lub rooj nrog qhov siab thiab dav ntawm 100 pixels thiab qhov deb ntawm 5 pixels los ntawm ntug ntawm lub xov tooj ntawm tes. Los ntawm kev sim nrog cov kev xaiv no, koj tuaj yeem ua tiav qhov ua kom haum rau cov kab lus xav tau.

Kauj ruam 3

Cov lus piav qhia, uas tsim cov ntawv thaiv nrog qee yam tsis tseem ceeb, kuj tseem yuav pab kom teeb tsa qhov tsim nyog ntawm cov khoom. Nws tuaj yeem siv los ua kom rov qab indentation ntawm pawg lus:

Kauj ruam 4

Koj tseem tuaj yeem siv cov duab pob tshab los kos duab, nyiam dua gif lossis.png

Tom qab kev ua tiav cov lus txib no, lub browser yuav nkag rau cov duab pob tshab uas yuav tsis pom rau cov neeg siv thiab tib lub sijhawm yuav tsim qhov chaw tsim nyog.

Pom zoo: