{"id":2322,"date":"2019-11-12T15:21:50","date_gmt":"2019-11-12T15:21:50","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=2322"},"modified":"2019-11-12T15:22:27","modified_gmt":"2019-11-12T15:22:27","slug":"n5-css-selectors","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2019\/11\/12\/n5-css-selectors\/","title":{"rendered":"N5 &#8211; CSS Selectors"},"content":{"rendered":"<p>CSS is used to change the look of the website but not the HTML content of the website.<\/p>\n<p>At National 5 there are 3 CSS selectors. These are used to identify which parts of the web page are styled by CSS instructions.<\/p>\n<ul>\n<li><strong>Element selector<\/strong> \u2013 This is used to select all html elements of the given type.<\/li>\n<\/ul>\n<p style=\"padding-left: 30px\"><em>P {color:red;}<\/em><\/p>\n<p style=\"padding-left: 60px\">P is the element selector<\/p>\n<p style=\"padding-left: 60px\">Color is the CSS property<\/p>\n<p style=\"padding-left: 60px\">Red is the CSS value<\/p>\n<ul>\n<li><strong>Class selector<\/strong> \u2013 this is used to target HTML elements of a given class.<\/li>\n<\/ul>\n<p style=\"padding-left: 30px\"><em>.center {text-align:center;}<\/em><\/p>\n<p style=\"padding-left: 60px\">.center is the name of the class selector<\/p>\n<p style=\"padding-left: 60px\">Text-align is the CSS Property<\/p>\n<p style=\"padding-left: 60px\">Center is the CSS Value<\/p>\n<ul>\n<li><strong>ID Selector<\/strong> \u2013 this is used to target a unique HTML element on the page. NB Only one ID with the same name on a page.<\/li>\n<\/ul>\n<p style=\"padding-left: 30px\"><em>#pageHeading {color:white;}<\/em><\/p>\n<p style=\"padding-left: 60px\">#pageHeading is the ID selector<\/p>\n<p style=\"padding-left: 60px\">Color is the CSS property<\/p>\n<p style=\"padding-left: 60px\">White is the CSS value<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CSS is used to change the look of the website but not the HTML content of the website. At National 5 there are 3 CSS selectors. These are used to identify which parts of the web page are styled by CSS instructions. Element selector \u2013 This is used to select all html elements of the &hellip;<\/p>\n","protected":false},"author":32,"featured_media":1385,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[432093,432053,432069],"tags":[],"class_list":["post-2322","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-implementation-css","category-national-5-2","category-web-design-and-development"],"jetpack_featured_media_url":"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/ColtnessHS-ComputingScience\/uploads\/sites\/12638\/2016\/09\/Slide3.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/2322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/comments?post=2322"}],"version-history":[{"count":1,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/2322\/revisions"}],"predecessor-version":[{"id":2323,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/2322\/revisions\/2323"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media\/1385"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media?parent=2322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=2322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=2322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}