[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-693037-105":59,"doc-detail-693037-en":130,"doc-similar-693037":151},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","cascading-style-sheets-css-cs142-lecture-notes-css-1-driving-problem-behind-css","Cascading Style Sheets (CSS) - CS142 Lecture Notes - CSS 1 - Driving problem behind CSS","","Cascading Style Sheets (CSS) lecture notes explain why styling should be separated from HTML content and how CSS rules define presentation consistently across pages. The notes cover browser default styling, linking style via class and selectors, and the DRY principle by defining styles once and reusing them. Topics include selector types, pseudo-classes like hover and link/visited, core properties for color, sizing and layout, and the CSS box model fundamentals (margin, padding, border, width/height).",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/cascading-style-sheets-css-cs142-lecture-notes-css-1-driving-problem-behind-css/693037/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/cascading-style-sheets-css-cs142-lecture-notes-css-1-driving-problem-behind-css/693037.png","ImageObject",300,407,{"name":92,"@type":93},"Ivy","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-30","2026-11-09",true,{"@type":102,"interactionType":103,"userInteractionCount":29},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Why was CSS introduced instead of relying on browser defaults?","Question",{"text":112,"@type":113},"CSS addresses inconsistent browser defaults by specifying styling rules explicitly. It also avoids manually coding presentation for every HTML element.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does CSS separate content from formatting?",{"text":117,"@type":113},"HTML contains what to display, while CSS stores formatting instructions in separate .css files. Elements can reference styles using attributes such as class.",{"name":119,"@type":110,"acceptedAnswer":120},"What key parts are included in the CSS box model?",{"text":121,"@type":113},"The box model includes border, padding, margin, and the content area governed by width and height. Total element width depends on these components.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},693037,1794246439,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":29,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":46,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":31,"preview_page_count":14,"preview_urls":143},549758252649,"https://ap-avatar.wpscdn.com/avatar/8000253669c5317157?_k=1778319167496531819","Cascading Style Sheets  \n(CSS)  \nMendel Rosenblum  \nCS142 Lecture Notes-CSS 1  \nDriving problem behind CSS  \nWhat font type and size does \u003Ch1>Introduction\u003C/h1> generate? Answer: Some default from the browser (HTML tells what browser how )  \nEarly HTML-Override defaults with attributes \u003Ctable border=\"2\" bordercolor=\"black\">  \nStyle sheets were added to address this: Specify style to use rather than browser default Not have to code styling on every element  \nCS142 Lecture Notes-CSS 2  \nKey concept: Separate style from content  \nContent (what to display) is in HTML files  \nFormatting information (how to display it) is in separate style sheets ( .css files) . Use an element attribute named class to link (e.g. \u003Cspan class=\"test\">) Result: define style information once, use in many places  \nConsider can you make all the text in the app slightly bigger?  \nOr purple is our new company color.  \nDRY principle: Don't Repeat Yourself  \nCS142 Lecture Notes-CSS 3  \nStyle sheet contain one or more CSS Rules  \nSelector  \nbody {  \nDeclaration Block  \nfont-family : Tahoma, Arial, sans-serif;  \ncolor : black;  \nbackground : white;  \nmargin : 8px;  \n}    \nProperty Value  \nCS142 Lecture Notes-CSS 4  \n\n| CSS Selector | CSS | HTML |\n| --- | --- | --- |\n| Tag name | h1 {\u003Cbr>color : red;} | \u003Ch1>Today’s Specials\u003C/h1> |\n| Class attribute | .large {\u003Cbr>font-size : 16pt;} | \u003Cp class=\"large\"> . .. |\n| Tag and Class | p.large {...} | \u003Cp class=\"large\"> . .. |\n| Element id | \\#p20 {\u003Cbr>font-weight : bold;} | \u003Cp id=\"p20\"> . .. |\n\nCS142 Lecture Notes-CSS 5  \nCSS Pseudo Selectors  \nhover-Apply rule when mouse is over element (e.g. tooltip)  \np:hover, a:hover {  \nbackground-color: yellow;  \n}  \na:link, a:visited-Apply rule when link has been visited or not visited (link)  \na:visited { a:link {  \ncolor: green; color: blue;  \n} }  \nCS142 Lecture Notes-CSS 6  \nCSS Properties  \nControl many style properties of an element:  \n● Coloring  \n● Size  \n● Position  \n● Visibility  \n● Many more: (e.g . p : { text-decoration : line-through; })  \n● Also used in animation  \nCS142 Lecture Notes-CSS 7  \nColor-Properties: color & background  color Must ultimately turn into red, green, and blue intensities between 0 and 255:  \n● Predefined names: red , blue , green , white , etc. (140 standard names)  \n● 8-bit hexadecimal numbers for red, green, blue: \\#ff0000   \n● 0-255 decimal intensities: rgb(255,255,0)  R G B   \nR G B  \n● Percentage intensities: rgb(80%,80%,100%)  \nR G B  \nExample : h1 : { color : red; }  \nCS142 Lecture Notes-CSS  \n8  \nCSS Box Model  \n\n| Border |  |  |  |\n| --- | --- | --- | --- |\n|  | Padding \u003Cbr>\u003Cbr>width\u003Cbr>Element\u003Cbr>\u003Cbr>\u003Cbr>\u003Cbr>\u003Cbr>height |  |  |\n|  |  |  |  |\n|  |  |  |  |\n\nMargin   \nTotal element width = width +  \nleft padding + right padding + left border + right border + left margin + right margin  \nMargin & Padding Transparent  \nCS142 Lecture Notes-CSS 9  \nCSS distance units  \n\n| Absolute |  |\n| --- | --- |\n| 2px | pixels |\n| 1mm | millimeters |\n| 2cm | centimeters |\n| 0.2in | inches |\n| 3pt | printer point 1/72 inch |\n| Relative |  |\n| 2em | 2 times the element’s current font size |\n| 3rem | 3 times the root element’s current font size |\n\nCS142 Lecture Notes-CSS 10","cbCaijMtUjJaH74E","https://ap.wps.com/l/cbCaijMtUjJaH74E","pdf",156616,"English","# Driving problem behind CSS\n## Separating style from content\n# CSS rules and selectors\n## Selector types (tag, class, id)\n## CSS pseudo selectors\n# CSS properties\n## Color and background properties\n# CSS Box Model\n## Margin and padding\n# CSS distance units","[{\"question\":\"Why was CSS introduced instead of relying on browser defaults?\",\"answer\":\"CSS addresses inconsistent browser defaults by specifying styling rules explicitly. It also avoids manually coding presentation for every HTML element.\"},{\"question\":\"How does CSS separate content from formatting?\",\"answer\":\"HTML contains what to display, while CSS stores formatting instructions in separate .css files. Elements can reference styles using attributes such as class.\"},{\"question\":\"What key parts are included in the CSS box model?\",\"answer\":\"The box model includes border, padding, margin, and the content area governed by width and height. Total element width depends on these components.\"}]","Cascading Style Sheets (CSS) - CS142 Lecture Notes - CSS 1 - Driving problem behind CSS | PDF",[144,148],{"page_no":8,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d3c78bc4fe6f6c5834ebabfed1ab6644.webp",983,552,{"page_no":14,"url":149,"width":150,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/8b10c9e81b47264bba78ce9531060446.webp",982,{"list":152,"token":66},[153,159,165,171,177,183,189,195,201,207],{"doc_id":154,"doc_title":155,"file_type":137,"home_preview_img_url":156,"slug":157,"view_count":29,"category_name":30,"create_tm":158},699461,"CSS Cascading Style Sheets - Basic CSS Properties Syntax and Usage","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011003513/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=R2KL5Pq6FKuIkVscj7oVwUeXGhg%3D","css-cascading-style-sheets-basic-css-properties-syntax-and-usage",1794468363,{"doc_id":160,"doc_title":161,"file_type":137,"home_preview_img_url":162,"slug":163,"view_count":24,"category_name":30,"create_tm":164},685836,"Internet Fundamentals - Introduction to Web Technologies - Lecture 3 - Cascading Style Sheets","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999697016/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=RF%2FoH7UiVFTTJceENuJCAkfOdJE%3D","internet-fundamentals-introduction-to-web-technologies-lecture-3-cascading-style-sheets",1794019250,{"doc_id":166,"doc_title":167,"file_type":137,"home_preview_img_url":168,"slug":169,"view_count":34,"category_name":30,"create_tm":170},693041,"How To Build a Website with CSS and HTML","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005053985/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=Jh9OqpcBJNve6Ki0hRHEVrozsLo%3D","how-to-build-a-website-with-css-and-html",1794246454,{"doc_id":172,"doc_title":173,"file_type":137,"home_preview_img_url":174,"slug":175,"view_count":29,"category_name":30,"create_tm":176},699464,"Basic CSS - Lecture 4 - CSS Styling Fundamentals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010042266/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=1O%2BA8CuXm3mSit2dPiwSUPDGu1s%3D","basic-css-lecture-4-css-styling-fundamentals",1794468368,{"doc_id":178,"doc_title":179,"file_type":137,"home_preview_img_url":180,"slug":181,"view_count":81,"category_name":30,"create_tm":182},699457,"Style Sheets - Session Objectives - Create and Use Different Types of Style Sheets","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011003368/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=xOYcBKIyt3n37UTrjA1LA62l06M%3D","style-sheets-session-objectives-create-and-use-different-types-of-style-sheets",1794468352,{"doc_id":184,"doc_title":185,"file_type":137,"home_preview_img_url":186,"slug":187,"view_count":81,"category_name":30,"create_tm":188},686721,"CSS - Applying Basic Styles","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001090655/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=CzW58O5Mny3MQiSeB1hoS7rmoA8%3D","css-applying-basic-styles",1794061500,{"doc_id":190,"doc_title":191,"file_type":137,"home_preview_img_url":192,"slug":193,"view_count":39,"category_name":30,"create_tm":194},703167,"CSS From A To Z - Introduction to CSS - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230013426264/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=DAf6kDgtFG%2ByPiMSDcQlkEA3JEk%3D","css-from-a-to-z-introduction-to-css-read-online-free",1794561915,{"doc_id":196,"doc_title":197,"file_type":137,"home_preview_img_url":198,"slug":199,"view_count":19,"category_name":30,"create_tm":200},699459,"Unit 3 - Cascading Style Sheets (CSS) - Lecture","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011003387/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=xGnGTNg7WLVx6cDW17ERwlFGWhs%3D","unit-3-cascading-style-sheets-css-lecture",1794468356,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":19,"category_name":30,"create_tm":206},693038,"HTML Styles-CSS - learn cascading style sheets","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005053917/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=Etyox21Wu84XRzdzKG0HJOEaXGs%3D","html-styles-css-learn-cascading-style-sheets",1794246445,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":24,"category_name":30,"create_tm":212},693034,"CSS Handbook","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005053838/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=7opr9xAeASXho78R5ySkBC1eakw%3D","css-handbook",1794246437]