{"id":819,"date":"2023-03-08T12:12:26","date_gmt":"2023-03-08T12:12:26","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/?page_id=819"},"modified":"2023-03-08T13:42:54","modified_gmt":"2023-03-08T13:42:54","slug":"html-layout","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/authoring-a-website\/week-1\/html-layout\/","title":{"rendered":"HTML layout"},"content":{"rendered":"\n<p>The &lt;header&gt; element represents a container for content at the top of the page that stays mostly the same across all pages of the website such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>header text for the site name<\/li><li>logo or icon<\/li><li>login links or forms<\/li><li>header for the page title, this would change across the pages<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"\/style.css\"&gt;\r\n    &lt;script type=\"text\/javascript\" src=\"\/script.js\"&gt;&lt;\/script&gt;\r\n    &lt;meta charset=\"UTF-8\"&gt;\r\n    &lt;meta author=\"Your name here\"&gt;\r\n    &lt;title&gt;My first webpage&lt;\/title&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\n\r    &lt;header&gt;\n      This is my website name\n    &lt;\/header&gt;\n    This is my first web page!\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;nav&gt; tag defines a set of navigation links.<\/p>\n\n\n\n<p>Notice that NOT all links of a document should be inside a &lt;nav&gt; element. The &lt;nav&gt; element is intended only for the major block of navigation links.<\/p>\n\n\n\n<p>Browsers, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content.<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;main&gt; tag specifies the main content of a document.<\/p>\n\n\n\n<p>The content inside the &lt;main&gt; element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;footer&gt; tag defines a footer for a document or section.<\/p>\n\n\n\n<p>A &lt;footer&gt; element typically contains:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>authorship information<\/li><li>copyright information<\/li><li>contact information<\/li><li>sitemap<\/li><li>back to the top links<\/li><li>related documents<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;div&gt; tag defines a division or a section in an HTML document.<\/p>\n\n\n\n<p>The &lt;div&gt; tag is used as a container for HTML elements \u2013 which is then styled with CSS or manipulated with JavaScript.<\/p>\n\n\n\n<p>The &lt;div&gt; tag is easily styled by using the class or id attribute.<\/p>\n\n\n\n<p>Any sort of content can be put inside the &lt;div&gt; tag!<\/p>\n\n\n\n<p>Note: By default, browsers always place a line break before and after the &lt;div&gt; element.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n  &lt;head&gt;\n    &lt;link rel=\"stylesheet\" href=\"\/style.css\"&gt;\n    &lt;script type=\"text\/javascript\" src=\"\/script.js\"&gt;&lt;\/script&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta author=\"Your name here\"&gt;\n    &lt;title&gt;My first webpage&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;nav&gt;The menu will go here&lt;\/nav&gt;\n    &lt;main&gt;\n      This is the main part of the page.\n    &lt;\/main&gt;\n    &lt;footer&gt;\n      This is the footer.\n    &lt;\/footer&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"310\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08122007\/html2.png\" alt=\"Example output after adding nav, header, main and footer\" class=\"wp-image-823\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08122007\/html2.png 365w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08122007\/html2-300x255.png 300w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><figcaption>Example output after adding nav, header, main and footer<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"nextlink\"><a href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/authoring-a-website\/week-1\/html-text\/\" data-type=\"page\" data-id=\"829\">Next: HTML text<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The &lt;header&gt; element represents a container for content at the top of the page that stays mostly the same across all pages of the website such as: header text for the site name logo or icon login links or forms header for the page title, this would change across the pages The &lt;nav&gt; tag defines&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/authoring-a-website\/week-1\/html-layout\/\">Continue reading <span class=\"screen-reader-text\">HTML layout<\/span><\/a><\/p>\n","protected":false},"author":5710,"featured_media":0,"parent":54,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-819","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/users\/5710"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/comments?post=819"}],"version-history":[{"count":6,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/819\/revisions"}],"predecessor-version":[{"id":831,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/819\/revisions\/831"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/54"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/media?parent=819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}