Docsity

HTML Structure, Styling Hooks, and Web Optimization, Lecture notes of Computer Science

Partial preview of the text

Download HTML Structure, Styling Hooks, and Web Optimization and more Lecture notes Computer Science in PDF only on Docsity!

\y mM, Fundamentals: Ne HTML Bat DW Elements: Chas mo Semantic ) [ net to) | group other > Div Element sed as o contac Elements Syntany Kdivys. &fawy a our * DIV Element js Macnly used when your : a ser CSS GHoup of HTML elements that ati Ahaxe et oO i sed Ou % Even though div element is cermmoan by ou ? Z a c me aad Sbouid conegai mot to aven “se it nene ete $e eg yoprtate. @0hen another element weuld be more apPTeP Fee Example ~ => Te divide up vour content inte Section, element Section weuld be mone apprwp7tate than a diy elemeny pe The Sseeton element has Semantic Meaning over meaning & Of Wists ol P Net Semantie tn oa lang vag a language , elements have the div element whieh is Cio HTML, whieh 415 theix pus semantic. meaning too) ° STE means Th wou use a Secton element, the brewsen will pee np ths Sementie mean "ng and cnclerst treat this ag a Secton ~ on desktops 2 Mobiles, You nare fF to % : (Ds apd clasces * The dd attr? bute. adds HTML element. a unique Pen prey to an Fou Example hy Belen Lh, La strele” >Movie Review pagec/hy > 8 tho ld =“Subtip 2” > Hello Everyone Console : arated Movie Review Page Hetlo Everyone * fou > YX can ‘Ye ference the te . fey tr . cy YOuY ove Sevipt ones. B ttle with ty CSS Examples title f colon btue 5 f ‘“ gTho of Sy f mbot fofetone’ ef Hee tells the > com > ee vane to tergee an tt od - "fe th that Value “ Id mames Sshoutel not be ou “ . See = moxe than once, and they Shoulda aloays be unique yates Cannet have Spaces fo them-Llead to unwanted je comes to Sey Leng and Ser pking ) sues phen it s Ad attribete ana dashes. ® fd Should only contains ftertes, acgres nd etsco nee Or contrast £0 we Ed attribute, the class attribute uw not freed ro be Lan Que and tan Contain Value toes SPaces « Bq* oO atv class = pow” >Kldiv > mMuitiple class names con be added to 4? elemene fry sopervoting the names bey Spas. wed - box 2K | div? div eloss =" box Notes:- euse an fel when you need a Uni aue udeneiprox B x spectple element, and use a class when og ok want Cee 70 apply styles 0" behaviour to mutbiple elements rousing game iA value more than once iw ATM eGt can iead tp unwanted sresutts and cues when crying t0 oppty Styles 0% eargeeeng — an element #9 java ccripe- HTML Entities Ww am Set * AD WTML EntPty > 07 chort ect et HO perene > reserved Ghar act ef mepresent a a characte used to n WTME- Fon Eaamele , ip G& want te display @ btext “this te glement” on the screen > te won't tere tarps I an element Ksempt 7 alert €"welcome .to, Forvecoding chailenges”)3 K/ Scenpt>? Exampie to tink External Javasevipt grle using Senpr element Lscrvipt Sre = path-to-javascript Js 7> K/ Serpe 7 a The Sre attryibure speegres the locatten for that zngewmat Sova seri pt Bile. Ge fs not encourag et ro peace atl tre Jove seri pt inside the ATMeE document because of Seperation of cencems. x Seperatten of CANcens Is a etesign progeeme Gee into drsttnet Secttons prince fre wsrherne You Seperate of Oust and have each Section address a Seperate con corn. tn thte case , we want tO seperate — our Savase nprt Code foram ATME code. Noes :- j ( ext exnal Javascript evthe sRe attribute Is used to ltnk an x J f le conan (S 4 design prencept2 Wihexe ethe Seperation oF Seperate Secttons , @ach handing 2 2 pregnom Sput ° nto ‘tS Din concen b Uutbor IL he Element rl ; reate GNoRe le button Elements jis used to C¢ Buttons on a niebpage ; t USPS Qp * Buttons agste interactive @lementg that click to Perpomm aetims Understanding How HTML Adfecrs SED SED- Seasich Bogtne optientzatfom bee iS @ practice that opttmiaes web pages So they became mone visible and yank hg hex on Sean, Eng ines Pore way to improve Your Site's Sko, is &e Provide Shea description fox the Web Page Using the meta Element.