Ngati mukufuna kupanga tsamba lanu, muyenera kukhala ndi chidziwitso cha HTML. Nkhaniyi ikufotokoza momwe mungapangire tsamba la HTML. Komanso, muphunzira kupanga xml sitemap ndi momwe mungawonjezere chithunzi ndi ulalo. Ndikofunikiranso kupanga xml sitemap, zomwe zingakuthandizeni kukonza tsamba lanu ndikuwonjezera kuchuluka kwa anthu. Chotsatira ndikusankha template.
Kupanga tsamba la html
HTML ndi chilankhulo cholembera. Chilichonse chatsamba lawebusayiti chimayimiridwa ndi tag. Chizindikiro chimazindikiridwa ndi mabatani a ngodya, ndipo chinthu chilichonse chimakhala ndi tag imodzi kapena zingapo. Zinthu zina zimangofunika tagi imodzi; ena angafunike ziwiri. Ma tag otsegula ndi otseka ali ndi slash yakutsogolo (/). Mwachitsanzo, gawo la ndime likuimiridwa ndi p tag. Mawu apakati pa ma tag otsegulira ndi otseka ndi ndime.
Kuti mupange chikalata cha HTML, muyenera kugwiritsa ntchito text editor. Makompyuta ambiri amakhala ndi chosintha mwachisawawa. Ogwiritsa ntchito Windows adzagwiritsa ntchito Internet Explorer, pomwe Mac ogwiritsa ntchito angagwiritse ntchito TextEdit. Mutha kukhazikitsa zosintha zamawu kuti mupange tsamba lowoneka mwaukadaulo, koma patsamba lanu loyamba la HTML, sizofunika. Mutha kugwiritsanso ntchito cholembera chosavuta komanso msakatuli aliyense. Ngati simukudziwa pulogalamu yomwe mungagwiritse ntchito, yesani kutsitsa mkonzi wa HTML waulere.
Tsamba la html lili ndi magawo awiri akulu: thupi ndi mutu. Gawo la thupi liri ndi zomwe zili pa webusaitiyi, pomwe gawo lamutu limagwiritsidwa ntchito pamutu ndi chidziwitso cha meta. Thupi lili ndi zinthu zina zonse, kuphatikiza zithunzi ndi zithunzi zina. Gawo lamutu ndi malo oyika maulalo anu oyenda. Mukamaliza kulemba thupi, mwakonzeka kuyika zomwe zili mu chikalatacho. Onetsetsani kuti mukugwiritsa ntchito thupi ndi mutu kuti muwonetsetse kuti tsamba lanu likupezeka kwa aliyense.
Kupanga xml sitemap
Ngati muli ndi tsamba la HTML, mungafune kupanga mapu a XML kuti muthandizire kufufuza tsamba lanu. Ngakhale izi sizikhudza masanjidwe anu osakira, zithandiza osakasaka kuti amvetsetse zomwe zili zanu ndikusintha momwe akukwawa. Tiyeni uku, tsamba lanu liziwoneka bwino pazotsatira zakusaka. Nazi njira zosavuta zoyambira:
Kupanga mapu atsamba a HTML ndikosavuta kuchita. Zomwe muyenera kuchita ndikupanga tebulo losavuta lamasamba atsamba lanu, ndi maulalo kutsamba lililonse. Kenako gwirizanitsani ndi tsamba la sitemap pamutu kapena pansi. Tiyeni uku, kaya tsamba lanu lili ndi masamba angati, anthu amatha kuyenda mosavuta kudutsamo. Komanso, simuyenera kupereka SEO kuti mupange mapu.
Tsamba lanu la HTML likakhala lamoyo, perekani ku Google Search Console. Mutha kugwiritsa ntchito kukulitsa fayilo iliyonse ndikutchula mapu anu a XML. Mutha kutumiza mapu atsamba a XML ku Google, koma sikofunikira. Osakatula a Google nthawi zambiri amakhala aluso pakuzindikira zatsopano, ndipo simuyenera kupereka mapu atsamba kwa iwo. Mutha kuziperekanso kumakina ena osakira, koma izi sizikutsimikizira kuti mupezeka ndi Google.
Sikofunikira kuwonjezera mapu a XML patsamba lanu, koma zidzakulitsa SEO yanu yatsamba. Ma Sitemaps amagwiritsidwa ntchito ndi injini zosaka kuti awathandize kuloza masamba omwe sanalumikizidwe mwachindunji ndi tsamba lawebusayiti. Ma Sitemaps amathandizanso kupititsa patsogolo kupezeka kwa zofalitsa zolemera. Kuyika mapu patsamba lanu kungathandize kuti tsamba lanu lizipezeka mosavuta ndi bots yakusaka.
Kuwonjezera chithunzi
Mu HTML, mutha kuwonjezera chithunzi patsamba pogwiritsa ntchito img tag. Tsambali lili ndi chithunzi chokha ndi mawonekedwe ake; sichifuna chizindikiro chotseka. Chithunzichi chikuyenera kuyikidwa mkati mwa gawo la thupi la chikalata cha HTML. Kuwonjezera m'lifupi ndi kutalika kwa chithunzicho, muyenera kuphatikiza zina zomwe zikufotokoza chithunzicho. Chizindikiro cha alt chiyenera kulembedwa ngati mukulemba kufotokozera kwa munthu amene sangachiwone.
Kuwonjezera chithunzi ku chikalata cha HTML kumafuna chidziwitso cha CSS ndi HTML. Kukula kwa chithunzi ndi chigamulo ndi zinthu ziwiri zofunika kuziganizira. Kukula kwa chithunzicho kudzatsimikizira momwe chidzagwirizane ndi zomwe zili mu chikalatacho. Ngati mukufuna kugwiritsa ntchito chiganizo chosiyana kapena mawonekedwe, mutha kuyesanso kukula kwa chithunzicho. Komabe, kumbukirani kuti makulitsidwe sikugwira ntchito nthawi zonse monga mukuyembekezera.
Lamulo labwino pakusintha kukula kwa chithunzi ndikuwonjezera m'lifupi mwake. M'lifupi kuyenera kukhala pixelisi imodzi yaying'ono kuposa kutalika kwake. Ngati chithunzicho ndi chaching'ono kwambiri kuti chiwonetsedwe, mukhoza kuwonjezera malire, ndiyeno sinthani kuti igwirizane ndi kukula kwa chithunzi. Mukhozanso kusintha malire a chithunzi powonjezera ku malire. Kuchuluka kwa malire ndi mtengo wokhazikika, koma mutha kuyiyika pamtengo uliwonse. Onetsetsani kuti chithunzicho chili ndi mawonekedwe a src.
Kuwonjezera ulalo
Mutha kuwonjezera ulalo mu HTML ku chikalata chanu pogwiritsa ntchito a> tag ndi href. Izi zipanga chizindikiro cha chikalatacho ndikutsegula mu tabu yatsopano. Mukhozanso kugwiritsa ntchito href kuti muyike chithunzi muzolembazo. Mutha kugwiritsanso ntchito ulalo wokhala ndi JavaScript code kuti musinthe batani la HTML kukhala ulalo. Mukachita izi, mutha kusintha ulalo wanu ndi CSS kapena JavaScript code.
Ulalo ndi kulumikizana kuchokera patsamba lina kupita ku lina. Amakhala ndi malekezero awiri, nangula wa gwero ndi nangula wa kopita. Ulalo utha kukhala chilichonse kuchokera pa chithunzi kupita ku fayilo yamawu. Malo ambiri ochezera a pa Intaneti ndi mawebusaiti amagwiritsa ntchito maulalo kutsogolera ogwiritsa ntchito ku URL inayake. HTML itha kugwiritsidwanso ntchito kufotokoza malo a ulalo. Iye 'a’ mawonekedwe amakupatsani mwayi wolumikiza ma code ku URL.
Popanga ulalo, onetsetsani kuti mukuganizira momwe alendo anu angagwiritsire ntchito zomwe zili. Maulalo ayenera kukhala ofotokozera, kotero kuti adziŵe zimene ayenera kuyembekezera. Kubwereza ulalo womwewo ndikoyipa kwa owerenga zenera, ndipo sichiwapatsa chidziwitso chilichonse chothandiza. Owerenga pazenera amauzanso ogwiritsa ntchito ngati maulalo alipo powapanga kukhala masitayelo osiyanasiyana kapena kumunsi. Mwa njira iyi, angapeze mosavuta chidziŵitso chimene akufuna.
Kuwonjezera tebulo
Kuwonjezera tebulo patsamba la HTML ndikosavuta, koma pali zinthu zingapo zomwe muyenera kuziganizira musanachite. Mtundu wakumbuyo wa tebulo lanu ndi wofunikira kuti mukope mlendo wanu ndikuwunikira zambiri zofunika. Mutha kuyika mtundu wosiyana pamutu patebulo ndi chinthu cha data pogwiritsa ntchito ma code amtundu wa hex kapena mayina amitundu. Mwanjira zonse, tebulo lanu liziwoneka mosavuta.
Mukhoza kuwonjezera mutu wa tebulo ndi deta ya tebulo ndi chinthu cha td, chomwe chimatanthawuza munthu payekha “mabokosi” za zomwe zili. Kuwonjezera mutu wa tebulo ndi sitepe yoyamba yowonetsera deta patsamba, ndipo muyenera kuwonjezera yoyamba ngati mukufuna. Tebulo liyeneranso kukhala ndi mitu ya mizere itatu. Mutu umodzi uyenera kukhala wopanda kanthu. Ngati tebulo lanu lili ndi mizati, muyenera kupanganso mitu yamizere pagawo lililonse.
Mukhozanso kuwonjezera mawu ofotokozera patebulo lanu. Mawu ofotokozera ndi chinthu chosankha chomwe chimafotokoza cholinga cha tebulo. Mawu omasulira amathandizanso kuti athe kupezeka. Gome litha kukhalanso ndi ma cell omwe amafotokoza magulu a data. Pomaliza, mukhoza kuwonjezera chinthu cha aad kuti mufotokoze mndandanda wa mizere ndi mizati. Mukhoza kugwiritsa ntchito zinthu zonse pamodzi kapena padera. Mutha kugwiritsanso ntchito pophatikiza, koma mawu ake ndi ofunika kwambiri.
Kuwonjezera div
Kuyika div ku fayilo ya HTML kumakupatsani mwayi wowonjezera gawo latsamba lanu popanda kulembanso tsamba lonse.. Div element ndi chidebe chapadera cha zolemba, zithunzi, ndi zinthu zina. Mutha kutchula chilichonse chomwe mungafune ndikusintha mawonekedwe ake kuti agwirizane ndi zosowa zanu. Mutha kuwonjezera kalasi kapena malire kuti mupange malo pakati pa div ndi zinthu zina patsamba lanu.
Mutha kugwiritsanso ntchito mawonekedwe amkati aHTML kuti muyike kachidindo mkati mwa div. Njirayi imavomereza code yomwe ili mu chingwe, ndipo ngati sichili mkati mwa div, zomwe zili zidzachotsedwa. Muyenera kupewa kuyika code mu div motere, chifukwa zitha kuwonetsa tsamba lanu ku zovuta zolemba pamawebusayiti. Ngati mukugwiritsa ntchito chilankhulo cholembera monga JavaScript, mutha kugwiritsa ntchito mawonekedwe amkati mwaHTML.
Div ndi tag yoyambira ya HTML yomwe imagwiritsidwa ntchito popanga ma code mu chikalata. Ikhoza kukhala ndi ndime, mtengo wa block, chithunzi, zomvera, kapena ngakhale mutu. Malo ake amakulolani kugwiritsa ntchito kalembedwe kofanana ndi chinenero ku zigawo zosiyanasiyana za tsamba. Ma div amagwiritsidwa ntchito bwino polemba ma semantics omwe amapezeka m'magulu azinthu zotsatizana. Div iyenera kugwiritsidwa ntchito mukafuna kuwonjezera mawonekedwe kugawo popanda kulembanso tsamba lonse.