Unokwakha iphepha le-HTML ngokusebenzisa iindlela ezimbalwa ezahlukeneyo. The first technique that you can use is to use a template. Ithemplate yindlela yokugcina kunye nokulungelelanisa umxholo wewebhusayithi. Unokufumana imizekelo yeetemplates kwi-Intanethi. Kukwaluncedo ukwenza eyakho itemplate yesiko.
!DOCTYPE html>
qala!DOCTYPE html> endkw I para:!DOCTYPE html> ngumyalelo wokudibanisa uxwebhu nohlobo oluthile loxwebhu, njenge XML. Esi sibhengezo sizibonakalisa njengoluhlu olufutshane lophawulo oluhambelana nesintaksi ethile. Injongo yesi sibhengezo kukuvumela iibhrawuza zewebhu ukuba ziqaphele iindidi ngeendidi zamaxwebhu kwaye ziwanike ngokuchanekileyo.
Isibhengezo se-DOCTYPE kufuneka sibekho ekuqaleni kwekhowudi yomthombo we-HTML. Kungenjalo, iwebhusayithi yakho ingabonisa ngokungalunganga okanye ingaboniswa kwaphela. Ukuba i-DOCTYPE ayikho, isikhangeli siya kutshintshela ku “Imowudi ye-Quirks” kwaye ubonise indawo ngendlela eyahlukileyo.
Isibhengezo se-doctype sichaphazela zombini i-HTML kunye namaphepha e-XHTML. Yinguqulelo eyenziwe lula ye-XHTML spec kwaye iqulethe iintambo ezimbini ezahlulwe ngeengcaphuno. Umtya wokuqala ngu “-//W3C/DTD HTML 4.01/EN” – oku kuxela ukuba uxwebhu lupapashwe yiW3C kwaye luguqulelo lweHTML 4.01. Umtya wesibini uxela ulwimi lwe-DTD.
Isibhengezo se-doctype siqhele ukubekwa phambi kweethegi ze-HTML. Oku kwenza iibhrawuza zichonge uxwebhu oluchanekileyo lwe-HTML kwaye zinqande i-quirks mode. DOCTYPE html yenye yezona zinto zibalulekileyo kuxwebhu lweHTML, kodwa isoloko ingahoywa. Ukuqinisekisa ukuba isibhengezo sedoctype yakho ichanekile, sebenzisa umhleli weHTML onobuchule bokukhangela iimpazamo.
!DOCTYPE css>
Xa usenza iphepha le-HTML, kubalulekile ukwazi ukuba yeyiphi imigangatho ye-HTML oza kuyisebenzisa. Nazi 3 iindawo eziphambili ukujonga: doctype, XHTML, kunye ne-XSLT. I-DOCTYPE ivumela ii-HTML-TAGS ezininzi, ngelixa iDOCTYPE Engqongqo ingqongqo kakhulu ngeemfuno ze-XHTML. Le ndlela, Umkhangeli zincwadi uyazi ukuba ayisiyofayile yeHTML engasebenziyo.
Amaxwebhu eSimbo se-CSS anokulungiselelwa kwiphepha le-HTML okanye agcinwe kwifayile eyahlukileyo.css. Ukusebenzisa iifayile zeCSS ezahlukeneyo kukusindisa ekubhaleni ikhowudi yeCSS kwakhona. Kwakhona kunciphisa imfuno yokubhala amaphepha esitayela. Amaphepha esitayile aya kuhlonyelwa kwisimbo esinegama.
Ukuze iwebhusayithi isebenze, kufuneka ibandakanye isihloko. Le yinto yokuqala umsebenzisi wesikhangeli aya kuyibona, ke qiniseka ukuba inentsingiselo. Ukusebenzisa isihloko esifanayo kumaphepha amaninzi akukhuthazwa – kufuneka unike igama ngalinye elahlukileyo. Kananjalo kufuneka uqinisekise ukuba umlinganiswa okwisihloko uyahluka kubo nabaphi na abanye abalinganiswa abakuxwebhu.
Ukuba ujonge isifundo sokukunceda ufunde iHTML kunye neCSS, zama iHTML & CSS uboya kwabasaqalayo tutorial series. Esi sifundo siya kukufundisa indlela yokubhala iphepha lewebhu usebenzisa iCSS kunye neHTML. Emva kokuba ulandele isifundo, unokwenza iphepha lakho lewebhu lokuqala usebenzisa i-notepad++. Kule tutorial, uya kufunda ukucwangcisa yonke imixholo yephepha lewebhu usebenzisa iithegi.
!DOCTYPE a
HTML doctype is a specification for a document’s standards and format. Kuyimfuneko ukuba ube ne-DOCTYPE ukuba ufuna ukuqinisekisa ukuba iphepha lakho lewebhu liyasebenza kuzo zonke izikhangeli zewebhu. Ikwasetyenziswa ngabakhangeli bewebhu ukuqinisekisa amaphepha akho eHTML, ekunceda ukuba uphephe iimpazamo kwaye uphucule iwebhusayithi yakho. Xa udala iphepha lewebhu, i-DOCTYPE kufuneka ikhutshelwe ngokuthe ngqo, ukuqinisekisa ukuba icazululwe ngokuchanekileyo kwaye itolikwa sisikhangeli.
Xa kusakhiwa iphepha le-HTML, ungasebenzisa ii-HTML-TAGS ezimbalwa. Ezi thegi zisetyenziselwa ukwenza iiheader kunye neefooter kwiphepha lewebhu. Zisenokuqulatha iinkcukacha ezongezelelweyo. I-HTML-TAGS yahlulahlulwe yangamacandelo amathathu. Ezi ziquka:
I-HTML ikwabonelela ngendlela yokuchaza iimpawu ezinokubangela iingxaki kwikhowudi. La maqumrhu aqulathe & kwaye ; kunye nabalinganiswa abambalwa abacacisayo. Njengokuba, ngesiJamani, ungasebenzisa ß ukuze ikhowudi zonke umlauts kunye S elibukhali kwiphepha.
Ukongeza ekubeni yimfuneko kwikhowudi yeHTML esebenzayo, iphepha elingenasibhengezo se-DOCTYPE liza kuboniswa ngokungalunganga. Oku kwenzeka ngenxa yokuba iibhrawuza zitshintshela kwi “Imowudi ye-Quirks” xa uxwebhu lungaqulathanga i-DOCTYPE efanelekileyo.
!DOCTYPE b
HTML5 is a markup language. Ukongeza esi sibhengezo kwifayile yakho ye-HTML kuya kuxelela umkhangeli zincwadi wakho ukuba yeyiphi imigangatho omawuyisebenzise kunye nendlela yokunika uphawu.. Oku kubalulekile kuba ufuna iphepha lakho le-HTML linikezelwe ngokuchanekileyo. Ukwengeza, kuya kunceda iwebhusayithi yakho ibonakale icocekile kwaye iyingcali.
I-HTML lulwimi lophawu, oko kuthetha ukuba inemigangatho. I-World Wide Web Consortium (W3C) iphuhlisa kwaye igcine imigangatho yeHTML. Olu lwimi lusemgangathweni wokwenza amaphepha ewebhu kwaye lusetyenziswa kakhulu. I-HTML isetyenziselwa amaphepha ewebhu, into ethetha ukuba unokongeza nasiphi na isicatshulwa okanye umzobo kuyo, kwaye unokubandakanya imultimedia kumaphepha akho ewebhu.
Kukho iindidi ezininzi zamaphepha e-HTML, kwaye unokukhetha i-DOCTYPE-Bereich ehambelana neemfuno zakho. Umzekelo, I-DOCTYPE Engqongqo ingqongqo malunga neemfuneko ze-XHTML kune-DOCTYPE B, kodwa ivumela ii-HTML-TAGS ezininzi.
Ungazicwangcisa ngokwakho i-HTML-Website yakho. Nangona kunjalo, oku kuneengxaki zako. Ifuna izakhono ezisisiseko zokucwangcisa, kunye nokuqonda ngokupheleleyo iHTML. Ukwengeza, kunokutya ixesha elininzi. Nangona kunjalo, ukuba uzinikele, unokwakha iwebhusayithi esebenzayo.
Enye into ebalulekileyo ye-HTML kukuba ikuvumela ukuba ungayihoyi isicatshulwa. Unokongeza amagqabantshintshi kwaye uwasebenzise ukuchaza ulwakhiwo oluntsonkothileyo okanye ukulahla isicatshulwa esingafunekiyo.
!DOCTYPE css
While coding an HTML page, kufuneka usoloko udibanisa i!DOCTYPE css ye HTML ithegi ekuqaleni kwephepha. Oku kuya kuxelela umkhangeli zincwadi ukuba loluphi uhlobo loxwebhu ejongene nalo kwaye inqande iimpazamo ekubeni zenziwe. Ukuba i-doctype ayikho, ikhowudi ye-HTML ayiyi kusebenzi kwaye iwebhusayithi ayiyi kuboniswa ngokuchanekileyo.
Unokongeza i-erklartext yexesha elifutshane kwiphepha lakho le-HTML. Lo mbhalo ubizwa ngokuba yi-tooltip, kwaye ngokuqhelekileyo ibhalwa njenge-monospace coding. Ukuba ufuna ukwenza iphepha le-HTML elintsokothileyo, kufuneka usebenzise iCSS.
Ukusebenzisa ifayile ye-DOCTYPE css kwiphepha lakho le-HTML kuya kukuvumela ukuba wenze iwebhusayithi ephucukileyo ngaphandle komzamo omkhulu.. Le fayile iqulethe inkcazo malunga nokuba iphepha lakho le-HTML kufuneka libe yintoni kwaye lingamelanga liqulathe ntoni. Ikwakunceda ukuba ufunde kwiimpazamo zakho.
Ukongeza i-DOCTYPE css yephepha le-HTML yenye yeendlela ezilungileyo zokwenza iwebhusayithi yakho ifikeleleke kubaphulaphuli abohlukeneyo.. Ungayisebenzisa ukuxelela abakhangeli ukuba iphepha lakho lixwebhu leHTML kwaye loluphi ulwimi oza kulinikezela. Umhleli olungileyo we-HTML uya kuba nendawo eyakhelweyo yokujonga i-doctype.
!DOCTYPE css >
Ulwimi lwekhowudi ye-HTML luye lwavela kwiminyaka ukuquka ukucoceka, isakhiwo esifutshane. Oku kuvumela abaqulunqi bewebhu ukuba benze iiwebhusayithi ezinomtsalane nezisebenzayo. I-DOCTYPE ichonga ikhowudi esetyenzisiweyo ukwenza iphepha lewebhu, kwaye ixelela isikhangeli sewebhu into enokuyenza kwaye ayinakuyenza ngayo. Yinxalenye ebalulekileyo yokuqinisekisa iphepha lakho le-HTML, ngoko ke kubalulekile ukuyikopa ngokuchanekileyo.
Ithegi ye-html ye-DOCTYPE inceda isikhangeli ukuba sichonge iwebhusayithi yakho kwaye inceda abadwelisi benkqubo bazi ukuba bayitolika njani. Iithegi ze-doctype kufuneka zivele ekuqaleni kwephepha ngalinye lewebhusayithi. Nangona kunjalo, azinyanzelekanga. Kungcono ukusebenzisa i-DOCTYPE echanekileyo ngephepha ngalinye.
Amaphepha e-HTML aneendawo ezintathu eziphambili. Ekuqaleni, kukho DOCTYPE-Bereich. Oku kuchaza ukuba yeyiphi imigangatho esetyenziswa yiwebhusayithi yakho. I-DOCTYPE-Bereich ikuvumela ukuba usebenzise ngakumbi i-HTML-TAGS. DOCTYPE Ngokungqongqo, kwelinye icala, ibeka iimfuno ezingqongqo zeXHTML.
I-HTML lulwimi olusekelwe kwikhowudi yomlinganiswa. Ingasetyenziselwa ukufomatha okubhaliweyo. Iikhowudi zoonobumba zingasetyenziselwa ukucacisa imibala kunye neefonti. Unokongeza amakhonkco kumaphepha akho ewebhu. Ukongeza amakhonkco kubo yinxalenye ebalulekileyo yamaphepha ewebhu. Umzekelo, unokongeza ikhonkco kwimveliso kwiAmazon.
I-DOCTYPE yinto ebalulekileyo kumaxwebhu e-HTML. Ukuba wenza impazamo kule khowudi, iwebhusayithi yakho ayizukuboniswa ngokuchanekileyo. Ukuba awuqinisekanga malunga ne-DOCTYPE eyiyo, umhleli olungileyo we-HTML uya kuba nendawo yokukhangela imposiso eyakhelwe-ngaphakathi.