{"id":195,"date":"2022-09-09T11:15:00","date_gmt":"2022-09-09T10:15:00","guid":{"rendered":"http:\/\/www.dpnwordpress.org\/principles-of-coding\/?p=195"},"modified":"2022-09-23T09:07:07","modified_gmt":"2022-09-23T08:07:07","slug":"cascading-style-sheets","status":"publish","type":"post","link":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/","title":{"rendered":"Cascading Style Sheets"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Why Learn CSS?<\/strong><\/h2>\n\n\n\n<ul><li>CSS stands for Cascading Style Sheets<\/li><li>CSS describes how HTML elements are to be displayed on screen, paper, or in other media<\/li><li>CSS saves a lot of work. It can control the layout of multiple web pages all at once<\/li><li>External stylesheets are stored in CSS files<\/li><\/ul>\n\n\n\n<p>CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>CSS Solved a Big Problem<\/strong><\/h3>\n\n\n\n<p>HTML was NEVER intended to contain tags for formatting a web page<\/p>\n\n\n\n<p>HTML was created to describe the content of a web page, like:<\/p>\n\n\n\n<p>&lt;h1&gt;This is a heading&lt;\/h1&gt;<\/p>\n\n\n\n<p>&lt;p&gt;This is a paragraph.&lt;\/p&gt;<\/p>\n\n\n\n<p><br>When tags like &lt;font&gt;, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large websites, where fonts and color information were added to every single page, became a long and expensive process.<\/p>\n\n\n\n<p>To solve this problem, the <strong>World Wide Web Consortium (W3C)<\/strong> created CSS.<\/p>\n\n\n\n<p>CSS removed the style formatting from the HTML page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>CSS Saves a Lot of Work<\/strong><\/h3>\n\n\n\n<p>The style definitions are normally saved in external .css files.<\/p>\n\n\n\n<p>With an external stylesheet file, you can change the look of an entire website by changing just one file<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>CSS Syntax<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized is-style-default\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/wp-content\/uploads\/2022\/09\/CSS-img_selector.gif\" alt=\"Image describing how CSS (cascading style sheets) is written: includes the selector, declaration, property and value\" class=\"wp-image-197\" width=\"567\" height=\"119\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Why Learn CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements are to be displayed on screen, paper, or in other media CSS saves a lot of work. It can control the layout of multiple web pages &hellip; <a href=\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/\">Continued<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"kt_blocks_editor_width":"","footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cascading Style Sheets - Digital Marketing - Principles of Coding<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cascading Style Sheets - Digital Marketing - Principles of Coding\" \/>\n<meta property=\"og:description\" content=\"Why Learn CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements are to be displayed on screen, paper, or in other media CSS saves a lot of work. It can control the layout of multiple web pages &hellip; Continued\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/\" \/>\n<meta property=\"og:site_name\" content=\"Digital Marketing - Principles of Coding\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-09T10:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-09-23T08:07:07+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dpnwordpress.org\/principles-of-coding\/wp-content\/uploads\/2022\/09\/CSS-img_selector.gif\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/\",\"url\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/\",\"name\":\"Cascading Style Sheets - Digital Marketing - Principles of Coding\",\"isPartOf\":{\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#website\"},\"datePublished\":\"2022-09-09T10:15:00+00:00\",\"dateModified\":\"2022-09-23T08:07:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#\/schema\/person\/9b14ee07c1eceb6abf0459cdfb721952\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cascading Style Sheets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#website\",\"url\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/\",\"name\":\"Digital Marketing - Principles of Coding\",\"description\":\"Resources and Revision\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#\/schema\/person\/9b14ee07c1eceb6abf0459cdfb721952\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a97f9039c0f2b6de485c50a2cdfd0210?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a97f9039c0f2b6de485c50a2cdfd0210?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/www.dpnwordpress.org\/principles-of-coding\"],\"url\":\"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cascading Style Sheets - Digital Marketing - Principles of Coding","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_GB","og_type":"article","og_title":"Cascading Style Sheets - Digital Marketing - Principles of Coding","og_description":"Why Learn CSS? CSS stands for Cascading Style Sheets CSS describes how HTML elements are to be displayed on screen, paper, or in other media CSS saves a lot of work. It can control the layout of multiple web pages &hellip; Continued","og_url":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/","og_site_name":"Digital Marketing - Principles of Coding","article_published_time":"2022-09-09T10:15:00+00:00","article_modified_time":"2022-09-23T08:07:07+00:00","og_image":[{"url":"http:\/\/www.dpnwordpress.org\/principles-of-coding\/wp-content\/uploads\/2022\/09\/CSS-img_selector.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/","url":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/","name":"Cascading Style Sheets - Digital Marketing - Principles of Coding","isPartOf":{"@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#website"},"datePublished":"2022-09-09T10:15:00+00:00","dateModified":"2022-09-23T08:07:07+00:00","author":{"@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#\/schema\/person\/9b14ee07c1eceb6abf0459cdfb721952"},"breadcrumb":{"@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/2022\/09\/09\/cascading-style-sheets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/"},{"@type":"ListItem","position":2,"name":"Cascading Style Sheets"}]},{"@type":"WebSite","@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#website","url":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/","name":"Digital Marketing - Principles of Coding","description":"Resources and Revision","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#\/schema\/person\/9b14ee07c1eceb6abf0459cdfb721952","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a97f9039c0f2b6de485c50a2cdfd0210?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a97f9039c0f2b6de485c50a2cdfd0210?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/www.dpnwordpress.org\/principles-of-coding"],"url":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/posts\/195"}],"collection":[{"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":2,"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":199,"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions\/199"}],"wp:attachment":[{"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dpnwordpress.org\/principles-of-coding\/index.php\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}