{"id":2324,"date":"2019-11-13T09:55:13","date_gmt":"2019-11-13T09:55:13","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=2324"},"modified":"2019-11-13T09:55:13","modified_gmt":"2019-11-13T09:55:13","slug":"n5-css-locations","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2019\/11\/13\/n5-css-locations\/","title":{"rendered":"N5 &#8211; CSS locations"},"content":{"rendered":"<p>There are three places that CSS data can be stored for use with HTML files.<\/p>\n<h3><strong>Inline<\/strong><\/h3>\n<p style=\"padding-left: 30px\">Inline CSS applies to one html element it is added as the value for a style attribute.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;h1 style='color:red;'&gt;Page heading&lt;\/h1&gt;\r\n<\/pre>\n<h3><strong>Internal<\/strong><\/h3>\n<p style=\"padding-left: 30px\">Internal CSS is declared inside &lt;style&gt; which is located in the &lt;head&gt; area of the page. It applies to one page of html.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;head&gt;\r\n&lt;head&gt;\r\n &lt;style&gt;\r\n   p {background-color:pink;}\r\n &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>External<\/strong><\/h3>\n<p style=\"padding-left: 30px\">External CSS is stored inside a separate text file (.CSS) it applies to all webpages that link to it (applies to whole site). A link is required in the &lt;head&gt; of the HTML file this link includes the name of the CSS file<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;head&gt;\r\n  &lt;link\u00a0rel=&quot;stylesheet&quot;\u00a0type=&quot;text\/css&quot;\u00a0\u00a0href=&quot;style.css&quot;&gt;\r\n&lt;\/head&gt;<\/pre>\n<p style=\"padding-left: 30px\">The CSS file has the selectors and properties stored in the same way as internal<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">#redBox { background-color:red;\r\n              Color:black;}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are three places that CSS data can be stored for use with HTML files. Inline Inline CSS applies to one html element it is added as the value for a style attribute. &lt;h1 style=&#8217;color:red;&#8217;&gt;Page heading&lt;\/h1&gt; Internal Internal CSS is declared inside &lt;style&gt; which is located in the &lt;head&gt; area of the page. It applies &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],"tags":[],"class_list":["post-2324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-implementation-css","category-national-5-2"],"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\/2324","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=2324"}],"version-history":[{"count":6,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/2324\/revisions"}],"predecessor-version":[{"id":2330,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/2324\/revisions\/2330"}],"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=2324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=2324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=2324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}