Uma ufuna ukuzakhela elakho ikhasi lewebhu, kufanele ube nokuqonda kwe-HTML. This article explains how to create an HTML page. Futhi, uzofunda ukwenza imephu yesayithi ye-xml nokuthi ungangeza kanjani isithombe nesixhumanisi. Kubalulekile futhi ukudala imephu yesayithi ye-xml, okungakusiza ukuthi uhlele isayithi lakho futhi wandise ithrafikhi yakho. Isinyathelo esilandelayo ukukhetha isifanekiso.
Creating a html page
I-HTML iwulimi lwemakhaphu. Yonke into yekhasi lewebhu imelwa umaka. Umaka ukhonjwa ngabakaki be-engeli, futhi yonke into inomaki oyedwa noma ngaphezulu. Ezinye izici zidinga umaka owodwa kuphela; abanye bangadinga ezimbili. Amathegi okuvula nawokuvala ane-slash eya phambili (/). Ngokwesibonelo, isici sendima simelelwa umaka p. Umbhalo phakathi kwamathegi okuvula nawokuvala umbhalo wendima.
Ukuze udale idokhumenti ye-HTML, uzodinga ukusebenzisa isihleli sombhalo. Amakhompyutha amaningi anomhleli wombhalo ngokuzenzakalelayo. Abasebenzisi beWindows bazosebenzisa i-Internet Explorer, kuyilapho abasebenzisi be-Mac bengasebenzisa i-TextEdit. Ungafaka umhleli wombhalo ophambili ukuze udale ikhasi lewebhu elibukeka kahle, kodwa ekhasini lakho lokuqala le-HTML, akudingekile. Ungasebenzisa futhi umhleli wombhalo olula nanoma yisiphi isiphequluli sewebhu. Uma ungaqiniseki ukuthi yiluphi uhlelo ongalusebenzisa, zama ukulanda isihleli samahhala se-HTML.
Ikhasi le-html linezigaba ezimbili eziyinhloko: umzimba nekhanda. Ingxenye yomzimba iqukethe okuqukethwe kwangempela kwewebhusayithi, kuyilapho ingxenye yekhanda isetshenziselwa isihloko nolwazi lwe-meta. Umzimba uqukethe zonke ezinye izakhi, kuhlanganise izithombe nezinye ihluzo. Isigaba sikanhlokweni yindawo yokubeka izixhumanisi zakho zokuzulazula. Ngemva kokuqeda ukubhala umzimba, usukulungele ukufaka okuqukethwe kwedokhumenti. Qiniseka ukuthi usebenzisa izakhi zomzimba nekhanda ukuze uqinisekise ukuthi iwebhusayithi yakho ifinyeleleka kuwo wonke umuntu.
Creating a xml sitemap
If you have an HTML page, ungase ufune ukudala imephu yesayithi ye-XML ukuze usize izinjini zokusesha zikhase iwebhusayithi yakho. Nakuba lokhu ngeke kuthinte amazinga akho okusesha, kuzosiza izinjini zokusesha ziqonde okuqukethwe kwakho futhi zilungise izinga lokucaca kwazo. Ngale ndlela, iwebhusayithi yakho izobonakala kakhulu emiphumeleni yenjini yokusesha. Nazi izinyathelo ezilula zokuqalisa:
Ukudala imephu yesayithi ye-HTML kulula ukwenza. Okufanele ukwenze ukwenza ithebula elilula lamakhasi esayithi lakho, enezixhumanisi ekhasini ngalinye. Bese uxhuma kulelo khasi lemephu yesayithi kunhlokweni noma kunyaweni. Ngale ndlela, noma ngabe isayithi lakho linamakhasi amangaki, abantu bangahamba kalula kuzo. Ngaphezu kwalokho, akudingeki ukuthi uthumele i-SEO ukuze udale imephu yesayithi.
Uma ikhasi lakho le-HTML selibukhoma, ithumele ku-Google Search Console. Ungasebenzisa noma yisiphi isandiso sefayela futhi uqambe imephu yakho yesayithi ye-XML. Ungahambisa imephu yesayithi ye-XML ku-Google, kodwa akudingekile. Abaseshi be-Google ngokuvamile bahle kakhulu ekutholeni okuqukethwe okusha, futhi awudingi ukuthumela imephu yesayithi kubo. Ungakwazi futhi ukuyihambisa kwezinye izinjini zokusesha, kodwa lokhu akuqinisekisi ukuthi uzotholwa yi-Google.
Akudingekile ukwengeza imephu yesayithi ye-XML ekhasini lakho lewebhu, kodwa izokwandisa i-SEO yewebhusayithi yakho. Amamephu esayithi asetshenziswa izinjini zokusesha ukuze azisize zikhombe amakhasi angaxhumene ngqo nekhasi lewebhu. Amamephu esayithi aphinde asize ukuthuthukisa ukufinyeleleka kokuqukethwe kwemidiya enothile. Ukwengeza imephu yesayithi kuwebhusayithi yakho kungasiza ukwenza isayithi lakho lifinyeleleke kalula kuma-bots enjini yokusesha.
Adding a picture
In HTML, ungakwazi ukwengeza isithombe ekhasini ngokusebenzisa ithegi ye-img. Lo maki uqukethe kuphela isithombe nezibaluli zaso; ayidingi ithegi yokuvala. Le thegi yesithombe kufanele ifakwe ngaphakathi kwengxenye yomzimba yedokhumenti ye-HTML. Ngaphezu kobubanzi nobude besithombe, kufanele ufake esinye isibaluli esichaza isithombe. Ithegi ye-alt kufanele ibhalwe sengathi ubhalela umuntu ongakwazi ukuyibona incazelo.
Ukwengeza isithombe kudokhumenti ye-HTML kudinga ulwazi oluthile lwe-CSS ne-HTML. Usayizi wesithombe nokulungiswa yizici ezimbili ezibalulekile okufanele zicatshangelwe. Usayizi wesithombe uzonquma ukuthi sizongena kanjani kokuqukethwe kwedokhumenti. Uma ungathanda ukusebenzisa ukulungiswa okuhlukile noma ukubukeka kwesilinganiselo, ungaphinda uzame ukushintsha usayizi wesithombe. Nokho, khumbula ukuthi ukukala akusebenzi njalo njengoba ulindele.
Umthetho omuhle wesithupha wokulungisa usayizi wesithombe ukwandisa ububanzi baso. Ububanzi kufanele okungenani bube buncane ngephikseli eyodwa kunobude. Uma isithombe sisincane kakhulu ukuthi singaboniswa, ungakwazi ukwengeza umngcele, bese uyilungisa ukuze ilingane nosayizi wesithombe. Ungakwazi futhi ukulungisa umngcele wesithombe ngokuwungeza kusibaluli somngcele. Ugqinsi lomngcele yinani elizenzakalelayo, kodwa ungayisetha kunoma yiliphi inani. Qiniseka ukuthi isithombe sinemfanelo ye-src.
Adding a link
You can add a link in HTML to your document using an a> umaka ngesibaluli se- href. Lokhu kuzodala ibhukhimakhi yedokhumenti futhi kuyivule kuthebhu entsha. Ungasebenzisa futhi isibaluli se- href ukuze ufake isithombe kudokhumenti. Ungasebenzisa futhi isixhumanisi esinekhodi ye-JavaScript ukuze uguqule inkinobho ye-HTML ibe isixhumanisi. Uma usukwenzile lokhu, ungabhala isixhumanisi sakho nge-CSS noma ngekhodi ye-JavaScript.
Isixhumanisi siwuxhumano olusuka kwenye insiza yewebhu iye kwenye. Iqukethe iziphetho ezimbili, ihange lomthombo kanye nehange lendawo. Isixhumanisi singaba yinoma yini ukusuka esithombeni kuye kufayela lombhalo. Izingosi eziningi zokuxhumana nabantu kanye namawebhusayithi asebenzisa izixhumanisi ukuqondisa abasebenzisi ku-URL ethile. I-HTML ingasetshenziswa futhi ukucacisa indawo yesixhumanisi. Ithi 'a’ Isibaluli sikuvumela ukuthi uxhume izici zekhodi ku-URL.
Lapho uklama isixhumanisi, qiniseka ukuthi ucabangela ukuthi izivakashi zakho zizokusebenzisa kanjani okuqukethwe. Umbhalo wesixhumanisi kufanele ube ochazayo, ukuze bazi kahle ukuthi yini okufanele bayilindele. Ukuphindwa kwe-URL efanayo akulungile kubafundi besikrini, futhi ayibaniki noma yiluphi ulwazi oluwusizo. Izifundi zesikrini ziphinde zitshele abasebenzisi uma izixhumanisi zikhona ngokuzenza zibe nesitayela esihlukile noma zidwetshelwe. Ngale ndlela, bangathola kalula ulwazi abaludingayo.
Adding a table
Adding a table to an HTML page is simple, kodwa kunezinto ezimbalwa okufanele uzicabangele ngaphambi kokuthi ukwenze. Umbala wangemuva wetafula lakho ubalulekile ukuze ubambe iso lesivakashi sakho futhi udonsele ukunaka olwazini olubalulekile. Ungasetha umbala ohlukile wesici sesihloko sethebula kanye nedatha yedatha ngokusebenzisa amakhodi ombala we-hex noma amagama ombala. Noma kunjalo, itafula lakho lizobonakala kalula.
Ungakwazi ukwengeza unhlokweni wethebula nedatha yethebula ngento ye-td, echaza umuntu ngamunye “amabhokisi” kokuqukethwe. Ukwengeza unhlokweni wethebula kuyisinyathelo sokuqala sokubonisa idatha ekhasini lewebhu, futhi kufanele wengeze eyokuqala uma ufuna. Ithebula kufanele futhi libe nezihloko zemigqa emithathu. Unhlokweni owodwa kufanele ungabi nalutho. Uma ithebula lakho linamakholomu, kufanele futhi udale izihloko zemigqa zekholomu ngayinye.
Ungakwazi futhi ukwengeza amagama-ncazo etafuleni lakho. Amagama-ncazo ayisici ozikhethela sona esichaza injongo yethebula. Amazwibela nawo ayasiza ekufinyeleleni. Ithebula lingaqukatha amaseli achaza amaqembu edatha. Ekugcineni, ungakwazi ukwengeza isici se-thead ukuze uchaze isethi yemigqa namakholomu. Ungasebenzisa zombili izakhi ndawonye noma ngokwehlukana. Ungakwazi ngisho ukuwasebenzisa ngokuhlanganisa, kodwa amazwibela abaluleke kakhulu.
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-elementi ye-div iyisitsha esikhethekile sombhalo, izithombe, nezinye izakhi. Ungayiqamba noma yini oyithandayo futhi uguqule izici zayo ukuze ihambisane nezidingo zakho. Ungakwazi futhi ukwengeza iklasi noma imajini ukuze udale isikhala phakathi kwe-div nezinye izici ekhasini lakho.
Ungasebenzisa futhi isibaluli se-innerHTML ukufaka ikhodi ngaphakathi kwe-div. Le ndlela yamukela ikhodi efakwe kuyunithi yezinhlamvu, futhi uma ingekho ngaphakathi kwe-div, okuqukethwe kuzosuswa. Kufanele ugweme ukufaka ikhodi ku-div ngale ndlela, njengoba ingase idalule iwebhusayithi yakho ekubeni sengozini yokubhalwa kwemibhalo ehlukahlukene. Uma usebenzisa ulimi lokubhala olufana ne-JavaScript, ungasebenzisa isibaluli se-innerHTML.
I-div iyithegi ye-HTML eyisisekelo esetshenziselwa ukuqoqa ikhodi ngaphakathi kwedokhumenti. Ingaqukatha isigaba, vimba isicaphuna, isithombe, umsindo, noma ngisho unhlokweni. Ukuma kwayo kukuvumela ukuthi usebenzise isitayela esifanayo nolimi ezigabeni ezihlukene zekhasi. Ama-Div asetshenziswa kahle kakhulu ukumaka ama-semantics ajwayelekile kumaqembu wezinto ezilandelanayo. I-div kufanele isetshenziswe uma ufuna ukwengeza isitayela esigabeni ngaphandle kokuthi uphinde ubhale lonke ikhasi.