Ukuba ufuna ukwenza elakho iphepha lewebhu, kufuneka ube nokuqonda kweHTML. This article explains how to create an HTML page. Kwakhona, uyakufunda ukwenza imephu yesayithi ye-xml kunye nendlela yokongeza umfanekiso kunye nekhonkco. Kukwabalulekile ukwenza imephu yesayithi ye-xml, enokukunceda ulungelelanise indawo yakho kunye nokwandisa itrafikhi yakho. Inyathelo elilandelayo kukukhetha itemplate.
Creating a html page
I-HTML lulwimi lophawu. Yonke into yephepha lewebhu imelwe yithegi. Ithegi ichongwa ngezibiyeli ze-engile, kwaye yonke into inethegi enye okanye ngaphezulu. Ezinye izinto zifuna ithegi enye kuphela; abanye banokufuna ezimbini. Iithegi zokuvula kunye nokuvala zine-slash yangaphambili (/). Umzekelo, isiqalelo somhlathi simelwe yi p tag. Isicatshulwa esiphakathi kweethegi zokuvula nokuvala sisiqendu somhlathi.
Ukwenza uxwebhu lweHTML, kuya kufuneka usebenzise umhleli wokubhaliweyo. Uninzi lweekhompyuter zinomhleli wokubhaliweyo ngokungagqibekanga. Abasebenzisi beWindows baya kusebenzisa i-Internet Explorer, ngelixa abasebenzisi beMac banokusebenzisa i-TextEdit. Ungafakela umhleli wombhalo ophucukileyo ukwenza iphepha lewebhu elijongeka njengengcali, kodwa kwiphepha lakho lokuqala le-HTML, akuyomfuneko. Ungasebenzisa umhleli wombhalo olula kunye nasiphi na isikhangeli sewebhu. Ukuba awuqinisekanga ngenkqubo oza kuyisebenzisa, zama ukukhuphela umhleli weHTML wasimahla.
Iphepha le-html linamacandelo amabini aphambili: umzimba kunye nentloko. Icandelo lomzimba liqulethe umxholo wangempela wewebhusayithi, ngelixa icandelo lentloko lisetyenziselwa isihloko kunye nolwazi lwemeta. Umzimba unazo zonke ezinye izinto, kuquka imifanekiso kunye neminye imizobo. Icandelo leheda yindawo yokubeka amakhonkco akho okukhangela. Emva kokuba ugqibile ukubhala umzimba, ukulungele ukufaka umxholo woxwebhu. Qinisekisa ukusebenzisa umzimba kunye nezinto zentloko ukuqinisekisa ukuba iwebhusayithi yakho iyafikeleleka kuye wonke umntu.
Creating a xml sitemap
If you have an HTML page, unokufuna ukwenza imephu yesayithi ye-XML ukunceda iinjini zokukhangela zirhubuluza iwebhusayithi yakho. Nangona oku akuyi kuchaphazela ukukhangela kwakho kwinqanaba, iya kunceda iinjini zokukhangela ziqonde umxholo wakho kwaye zilungelelanise izinga lokurhubuluza kwazo. Le ndlela, iwebhusayithi yakho iya kubonakala ngakumbi kwiziphumo zenjini yokukhangela. Nanga amanyathelo alula okuqalisa:
Ukwenza imephu yendawo yeHTML kulula ukuyenza. Konke okufuneka ukwenze kukwenza itafile elula yamaphepha esayithi lakho, ngamakhonkco kwiphepha ngalinye. Emva koko ikhonkco kwelo phepha lemephu yesayithi kwiheda okanye okubhalwe phantsi. Le ndlela, nokuba mangaphi amaphepha esayithi yakho, abantu banokuhamba ngokulula kuzo. Ngaphezu koko, akufuneki ungenise i-SEO ukwenza imephu yesayithi.
Nje ukuba iphepha lakho le-HTML liphile, yingenise kuGoogle Search Console. Ungasebenzisa naluphi na ulwandiso lwefayile kwaye unike igama lemephu yesayithi yakho yeXML. Ungathumela imephu yesayithi yeXML kuGoogle, kodwa akuyomfuneko. Abakhangeli bakaGoogle balungile kakhulu ekufumaneni umxholo omtsha, kwaye awudingi ukuthumela imephu yesayithi kubo. Unako kwakhona ukuyingenisa kwezinye iinjini zokukhangela, kodwa oku akuqinisekisi ukuba uyakufunyanwa nguGoogle.
Akuyomfuneko ukongeza imephu yesayithi ye-XML kwiphepha lakho lewebhu, kodwa iya kwandisa i-SEO yewebhusayithi yakho. Iimephu zesayithi zisetyenziswa ziinjini zokukhangela ukubanceda babonise amaphepha angadityaniswanga ngokuthe ngqo kwiphepha lewebhu. Iimephu zesayithi zikwanceda ukuphucula ukufikeleleka komxholo weendaba ezityebileyo. Ukongeza imephu yesayithi kwiwebhusayithi yakho kunokunceda ukwenza indawo yakho ifikeleleke ngakumbi kwi-injini yokukhangela bots.
Adding a picture
In HTML, unokongeza umfanekiso kwiphepha ngokusebenzisa img tag. Le thegi iqulethe kuphela umfanekiso kunye neempawu zayo; ayifuni ithegi yokuvala. Le thegi yomfanekiso kufuneka ifakwe ngaphakathi kwecandelo lomzimba wexwebhu leHTML. Ukongeza kububanzi kunye nobude bomfanekiso, kufuneka ubandakanye uphawu lwealt oluchaza umfanekiso. Ithegi yealt kufuneka ibhalwe ngokungathi ubhala inkcazo yomntu ongayiboniyo.
Ukongeza umfanekiso kuxwebhu lweHTML kufuna intwana yeCSS kunye nolwazi lweHTML. Ubungakanani bomfanekiso kunye nesisombululo zizinto ezimbini ezibalulekileyo ekufuneka ziqwalaselwe. Ubungakanani bomfanekiso buya kugqiba indlela oya kungena ngayo kumxholo woxwebhu. Ukuba ukhetha ukusebenzisa isisombululo esahlukileyo okanye umlinganiselo wembonakalo, ungazama nokutshintsha ubungakanani bomfanekiso. Nangona kunjalo, khumbula ukuba ukukala akusoloko kusebenza njengoko ulindele.
Umthetho olungileyo wokulungisa ubungakanani bomfanekiso kukwandisa ububanzi bawo. Ububanzi kufuneka ubuncinane ibenye ipixel encinci kunobude. Ukuba umfanekiso mncinane kakhulu ukuba ungaboniswa, unokongeza umda, kwaye emva koko uyilungelelanise ukuze ilingane nobungakanani bomfanekiso. Ungaphinda ulungelelanise umda womfanekiso ngokuwongeza kumda wophawu loyelelwano. Ubukhulu bomda lixabiso elimiselweyo, kodwa ungayibeka kulo naliphi na ixabiso. Qinisekisa ukuba umfanekiso unophawu lwe-src.
Adding a link
You can add a link in HTML to your document using an a> ithegi enophawu lwe- href. Oku kuya kudala ibhukmakhi yoxwebhu kwaye iyivule kwisithuba esitsha. Ungasebenzisa uphawu lwe- href ukufaka umfanekiso kuxwebhu. Ungasebenzisa ikhonkco kunye nekhowudi yeJavaScript ukuguqula iqhosha le-HTML libe likhonkco. Xa sele uyenzile le nto, Unokwenza ikhonkco lakho ngeCSS okanye ikhowudi yeJavaScript.
Ikhonkco ludibaniso olusuka kwisixhobo esinye sewebhu ukuya kwesinye. Ineziphelo ezibini, i-ankile yomthombo kunye ne-ankile yendawo ekuyiwa kuyo. Ikhonkco ingaba nantoni na ukusuka kumfanekiso ukuya kwifayile yombhalo. Uninzi lweendawo zokunxibelelana kwezentlalo kunye neewebhusayithi zisebenzisa amakhonkco ukuqondisa abasebenzisi kwi-URL ethile. I-HTML ingasetyenziselwa ukucacisa indawo yekhonkco. Yi’ uphawu lukuvumela ukuba udibanise amanqaku ekhowudi kwi-URL.
Xa uyila ikhonkco, qiniseka ukuba ucinga ukuba iindwendwe zakho ziya kuwusebenzisa njani umxholo. Isiqendu sonxulumaniso kufuneka sichaze, ukuze bayazi kakuhle into abafanele bayilindele. Ukuphindwa kwe-URL efanayo akulunganga kubafundi besikrini, kwaye ayibanikezi naluphi na ulwazi oluluncedo. Izifundi zesikrini zikwaxelela abasebenzisi xa amakhonkco ekhona ngokuwenza ahluke isimbo okanye akrwelwe umgca ngaphantsi. Ngele ndlela, banokulufumana lula ulwazi abalufunayo.
Adding a table
Adding a table to an HTML page is simple, kodwa kukho izinto ezimbalwa ekufuneka uziqwalasele ngaphambi kokuba uzenze. Umbala ongasemva wetafile yakho ubalulekile ekubambeni iliso londwendwe lwakho kwaye utsalele ingqalelo kulwazi olubalulekileyo. Unokuseta umbala owahlukileyo wento yentloko yetafile kunye nedatha yedatha ngokusebenzisa iikhowudi zemibala ye-hex okanye amagama ombala. Ngolunye uhlobo, itafile yakho iya kubonakala lula.
Unokongeza iheader yetafile kunye nedatha yetafile kunye ne-td element, echaza umntu ngamnye “iibhokisi” kumxholo. Ukongeza iheader yetafile linyathelo lokuqala lokubonisa idatha kwiphepha lewebhu, kwaye kufuneka wongeze eyokuqala ukuba uyafuna. Itheyibhile kufuneka kwakhona ibenezihloko ezikwimiqolo emithathu. Omnye umbhalo kufuneka ungabi nanto. Ukuba itheyibhile yakho ineekholamu, kufuneka wenze kwakhona iiheader zerowu zomqolo ngamnye.
Unokongeza ii-captions kwitafile yakho. I-caption yinto ekhethiweyo echaza injongo yetheyibhile. Iintloko-magama zikwaluncedo ekufikeleleni. Itheyibhile inokuqulatha iiseli ezichaza amaqela edatha. Ekugqibeleni, unokongeza i-element ye-thead ukuchaza uluhlu lwemiqolo kunye nemiqolo. Ungasebenzisa zombini izinto kunye okanye ngokwahlukeneyo. Unokude uzisebenzise ngokudibeneyo, kodwa i-caption yeyona ibalulekileyo.
Adding a div
Adding a div to an HTML file allows you to add a section of your webpage without re-writing the whole page. I div element sisikhongozeli esikhethekileyo sokubhaliweyo, imifanekiso, kunye nezinye izinto. Ungayibiza ngayo nayiphi na into oyithandayo kwaye utshintshe iimpawu zayo ukuze zihambelane neemfuno zakho. Unokongeza iklasi okanye umda ukwenza isithuba phakathi kwe-div kunye nezinye izinto kwiphepha lakho.
Unokusebenzisa uphawu lwangaphakathi lweHTML ukufaka ikhowudi ngaphakathi kwe div. Le ndlela yamkela ikhowudi evalelwe kumtya, kwaye ukuba ayikho ngaphakathi kwi-div, umxholo uya kususwa. Kuya kufuneka uphephe ukufaka ikhowudi kwi-div ngale ndlela, njengoko inokuthi iveze iwebhusayithi yakho kubuthathaka bokubhala okunqamlezileyo. Ukuba usebenzisa ulwimi lokubhala olufana neJavaScript, ungasebenzisa uphawu lwangaphakathi lweHTML.
I-div yithegi ye-HTML esisiseko esetyenziswa kwikhowudi yeqela ngaphakathi koxwebhu. Inokuqulatha umhlathi, block quote, umfanekiso, isandi, okanye intloko. Isikhundla sayo sikuvumela ukuba usebenzise isimbo esifanayo kunye nolwimi kumacandelo ahlukeneyo ephepha. IiDivs zisetyenziswa kakuhle ekuphawuleni iisemantics eziqhelekileyo kumaqela ezinto ezilandelelanayo. I-div kufuneka isetyenziswe xa ufuna ukongeza isitayile kwicandelo ngaphandle kokuphinda ubhale lonke iphepha.