[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-699464-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-699464-en":130,"doc-similar-699464":161},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","basic-css-lecture-4-css-styling-fundamentals","Basic CSS - Lecture 4 - CSS Styling Fundamentals","","Basic CSS explains how Cascading Styles Sheets style HTML documents using property-value rules and selectors. It covers three practical ways to apply CSS: inline styles set directly in HTML tags, internal styles defined within the HTML head via the style element, and external styles stored in separate .css files and linked to multiple pages. The lecture also introduces CSS syntax with selectors and curly-bracket declarations, showing how values such as font-size and color affect rendered content.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/basic-css-lecture-4-css-styling-fundamentals/699464/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/basic-css-lecture-4-css-styling-fundamentals/699464.png","ImageObject",300,407,{"name":42,"@type":43},"hdkawk","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-28","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is CSS and how does it relate to HTML?","Question",{"text":63,"@type":64},"CSS is a way to style HTML. HTML provides the content, while the style sheet controls the presentation of the document.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What are the three ways to apply CSS to HTML?",{"text":68,"@type":64},"CSS can be applied as inline, internal, or external styles. Inline styles go in HTML tags, internal styles are defined in the page head, and external styles are stored in separate CSS files linked to HTML pages.",{"name":70,"@type":61,"acceptedAnswer":71},"How does CSS syntax work with selectors and properties?",{"text":72,"@type":64},"CSS uses selectors (often HTML tag names) followed by curly brackets. Inside the brackets, properties are written as property: value pairs, separated by semicolons, such as body {font-size: 12px; color: blue; }.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},699464,1794468368,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":55,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":33,"preview_urls":145},3985747859855,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Basic CSS  \nIntroduction  \n• CSS, or Cascading Styles Sheets are a way to style HTML  \n• HTML should be used for the content, and the style sheet for the presentation of your document  \n• Styles have a format of property: value and most properties can be applied to most HTML tags  \nApplying CSS  \n• There are three ways of applying CSS to HTML:  \n– Inline  \n– Internal  \n– External  \n• The preferred approach is to have the HTML document be presentation free, and so inline and internal styles should be avoided whenever possible.  \nInline  \n• In-line styles are placed straight into the HTML tags using the style attribute.  \n• For example, the following style attribute of the paragraph tag will make the whole paragraph red:  \n\u003Cp style=\"color: red\">Content\u003C/p>  \nInternal  \n• Internal styles affect a whole page.  \n• The style element is put inside the head of the document, and it specifies all of the styles for the page.  \n• The following internal style specification will make all of the paragraphs in the page red and all of the links blue:  \n\u003Chead>  \n\u003Ctitle>CSS Example\u003C/title>  \n\u003Cstyle type=\"text/css\">p {color: red;} a {color: blue;}\u003C/style>  \n\u003C/head>  \nExternal  \n• External styles are used for the whole, multiple-page website.  \n• They are put in a separate CSS file and linked to the HTML files.  \nExternal  \n• The external style sheet can look something like this:  \np {color: red;} a {color: blue;}  \n• It doesn’t need any special additional syntax  \n• Can be written in a text editor like Notepad, and saved as “something.css”  \nLinking External CSS  \nOnce the external style sheet is completed, it can be linked to the HTML document like this:  \n\u003Chead>  \n\u003Ctitle>CSS Example\u003C/title>  \n\u003Clink rel=\"stylesheet\" type=\"text/css\"href=\"something.css\">  \n\u003C/head>  \nCSS syntax  \n• Instead of tags, CSS has selectors. Selectors are the names given to styles in internal and external style sheets.  \n• We will focus on HTML selectors, which are simply the names of HTML tags and are used to change the style of a specific tag.  \n• For each selector there are properties inside curly brackets, which simply take the form of words such as color, font-weight or background-color.  \n• A value is given to the property following a colon and semi-colons separate the properties.  \nExample  \nbody {font-size: 12px; color: blue;}  \n• This will apply the given values to the font-size and color properties of the body selector.  \n• So when this is applied to an HTML document, all text between the body tags (which is all text in the window) will be 12 pixels in size and blue in color.","cbCailmPQ5xzKN18","https://ap.wps.com/l/cbCailmPQ5xzKN18","pdf",287813,33,"English","# Applying CSS\n## Inline styles\n## Internal styles\n## External styles\n## Linking External CSS\n# CSS syntax\n## Selectors and declarations","[{\"question\":\"What is CSS and how does it relate to HTML?\",\"answer\":\"CSS is a way to style HTML. HTML provides the content, while the style sheet controls the presentation of the document.\"},{\"question\":\"What are the three ways to apply CSS to HTML?\",\"answer\":\"CSS can be applied as inline, internal, or external styles. Inline styles go in HTML tags, internal styles are defined in the page head, and external styles are stored in separate CSS files linked to HTML pages.\"},{\"question\":\"How does CSS syntax work with selectors and properties?\",\"answer\":\"CSS uses selectors (often HTML tag names) followed by curly brackets. Inside the brackets, properties are written as property: value pairs, separated by semicolons, such as body {font-size: 12px; color: blue; }.\"}]","Basic CSS - Lecture 4 - CSS Styling Fundamentals | PDF",83,[146,150,153,157],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e51a0a682f34330d7cf0b555106c07f9.webp",983,736,{"page_no":26,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/312b222babe378e49f6e7366cd96b7c7.webp",982,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/ff0c37c0824298e60365d9dbf95016a9.webp",981,735,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3e7865e6feacaecb3f7009a23516acc9.webp",980,734,{"list":162,"token":11},[163,169,175,181,187,193,199,205,211,217],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":55,"category_name":29,"create_tm":168},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=1796111999&Signature=xkp1JaDDvbAiIou13vf00%2BgWpM8%3D","css-cascading-style-sheets-basic-css-properties-syntax-and-usage",1794468363,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":97,"category_name":29,"create_tm":174},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=1796111999&Signature=WKx1GXY99zljcKwroKknQsdNau4%3D","internet-fundamentals-introduction-to-web-technologies-lecture-3-cascading-style-sheets",1794019250,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":33,"category_name":29,"create_tm":180},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=1796111999&Signature=C3%2BjMqWitFmFhT7u9pIzMhe0auc%3D","html-styles-css-learn-cascading-style-sheets",1794246445,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":30,"category_name":29,"create_tm":186},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=1796111999&Signature=9u2kTIYmhKwAh7kMa3qSw1zFFnU%3D","css-applying-basic-styles",1794061500,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":97,"category_name":29,"create_tm":192},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=1796111999&Signature=d2DBIc%2BkZNC8rI0QpZwmWhjm1g8%3D","css-handbook",1794246437,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":33,"category_name":29,"create_tm":198},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=1796111999&Signature=brdp98BO9zrvHwCxh0UuJRHkaOk%3D","unit-3-cascading-style-sheets-css-lecture",1794468356,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":33,"category_name":29,"create_tm":204},693040,"CSS Tutorial Part 1 - Introduction - Adding Style to a Web Page","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005053964/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=wQopp5jYHaWSkM4hLU2RqBieRY8%3D","css-tutorial-part-1-introduction-adding-style-to-a-web-page",1794246453,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":55,"category_name":29,"create_tm":210},693037,"Cascading Style Sheets (CSS) - CS142 Lecture Notes - CSS 1 - Driving problem behind CSS","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230004257728/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=bKEhzavb4mMRJaDMluUHhxW4M7I%3D","cascading-style-sheets-css-cs142-lecture-notes-css-1-driving-problem-behind-css",1794246439,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":55,"category_name":29,"create_tm":216},685839,"DCA-04 Block 2 - WEB-DESIGN - Unit-3 - Getting Started With CSS","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000223066/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=A35ysAM%2ByEb7PdnzMQ6re4%2BtX4g%3D","dca-04-block-2-web-design-unit-3-getting-started-with-css",1794019251,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":33,"category_name":29,"create_tm":222},697982,"Essential HTML Tags - Page 1 - Apply appropriate HTML tags","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010150459/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=AMIxwdXjDLf62oYLpZEc7Zy2y6c%3D","essential-html-tags-page-1-apply-appropriate-html-tags",1794446726]