{"id":829,"date":"2023-03-08T13:42:43","date_gmt":"2023-03-08T13:42:43","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/?page_id=829"},"modified":"2023-03-08T14:15:47","modified_gmt":"2023-03-08T14:15:47","slug":"html-text","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/authoring-a-website\/week-1\/html-text\/","title":{"rendered":"HTML text"},"content":{"rendered":"\n<p>The &lt;a&gt; tag defines a hyperlink, which is used to link from one page to another. It isn&#8217;t just used for text, you can put an anchor around anything, but I&#8217;m introducing it here so we can use it in the menu.<\/p>\n\n\n\n<p>The most important attribute of the &lt;a&gt; element is the href attribute, which indicates the link\u2019s destination.<\/p>\n\n\n\n<p>By default, links will appear in different colours depending on if the page has been visited or is active.<\/p>\n\n\n\n<p>If the &lt;a&gt; tag has no href attribute, it is only a placeholder for a hyperlink.<\/p>\n\n\n\n<p>A linked page is normally displayed in the current browser window, unless you specify another target.<\/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;header&gt;\n      This is my website name\n    &lt;\/header&gt;\n    &lt;nav&gt;\n      &lt;a href=\"\/index.html\"&gt;Home&lt;\/a&gt;\n    &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<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;h1&gt; to &lt;h6&gt; tags are used to define HTML headings.<\/p>\n\n\n\n<p>&lt;h1&gt; defines the most important heading. &lt;h6&gt; defines the least important heading.<\/p>\n\n\n\n<p>Note: Only use one &lt;h1&gt; per page \u2013 this should represent the main heading\/subject for the whole page. Also, do not skip heading levels \u2013 start with &lt;h1&gt;, then use &lt;h2&gt;, and so on.<\/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;header&gt;\n      This is my website name\n    &lt;\/header&gt;\n    &lt;nav&gt;\n      &lt;a href=\"\/index.html\"&gt;Home&lt;\/a&gt;\n    &lt;\/nav&gt;\n    &lt;main&gt;\n      &lt;h1&gt;Welcome to my home page&lt;\/h1&gt;\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<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;p&gt; tag defines a paragraph.<\/p>\n\n\n\n<p>Because &lt;p&gt; tags are block elements, browsers automatically add a single blank line before and after each &lt;p&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;header&gt;\n      This is my website name\n    &lt;\/header&gt;\n    &lt;nav&gt;\n      &lt;a href=\"\/index.html\"&gt;Home&lt;\/a&gt;\n    &lt;\/nav&gt;\n    &lt;main&gt;\n      &lt;h1&gt;Welcome to my home page&lt;\/h1&gt;\n      &lt;p&gt;This is the main part of the page.&lt;\/p&gt;\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<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The &lt;br&gt; tag inserts a single line break.<\/p>\n\n\n\n<p>The &lt;br&gt; tag is useful for writing addresses or poems.<\/p>\n\n\n\n<p>The &lt;br&gt; tag is an empty tag which means that it has no end tag.<\/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;header&gt;\n      This is my website name\n    &lt;\/header&gt;\n    &lt;nav&gt;\n      &lt;a href=\"\/index.html\"&gt;Home&lt;\/a&gt;\n    &lt;\/nav&gt;\n    &lt;main&gt;\n      &lt;h1&gt;Welcome to my home page&lt;\/h1&gt;\n      &lt;p&gt;This is the main part of the page.&lt;\/p&gt;\n      &lt;h2&gt;To do list&lt;\/h2&gt;\n      &lt;p&gt;\n        Learn HTML&lt;br&gt;\n        Learn CSS&lt;br&gt;\n        Learn Javascript&lt;br&gt;\n        Make a website\n      &lt;\/p&gt;\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=\"581\" height=\"565\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08135205\/html3.png\" alt=\"Example output after adding h1, a, p and br tags\" class=\"wp-image-835\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08135205\/html3.png 581w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08135205\/html3-300x292.png 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><figcaption>Example output after adding h1, a, p and br tags<\/figcaption><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>Hang on, that&#8217;s a list. There are better ways to do a list than using line breaks. We can use the &lt;ul&gt;, &lt;ol&gt;, and &lt;li&gt; tags.<\/p>\n\n\n\n<p>They can contain more than simply text. Very useful when grouping similar content such as in a menu or gallery.<\/p>\n\n\n\n<p>The &lt;ol&gt; tag defines an ordered list. An ordered list can be numerical or alphabetical.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>This<\/li><li>is<\/li><li>an<\/li><li>ordered<\/li><li>list<\/li><\/ol>\n\n\n\n<p>The &lt;ul&gt; tag defines an unordered (bulleted) list.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>This<\/li><li>is<\/li><li>an<\/li><li>unordered<\/li><li>list<\/li><\/ul>\n\n\n\n<p>The &lt;li&gt; tag defines a list item.<\/p>\n\n\n\n<p>In &lt;ul&gt; the list items will usually be displayed with bullet points.<\/p>\n\n\n\n<p>In &lt;ol&gt; the list items will usually be displayed with numbers or letters.<\/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;header&gt;\n      This is my website name\n    &lt;\/header&gt;\n    &lt;nav&gt;\n      &lt;a href=\"\/index.html\"&gt;Home&lt;\/a&gt;\n    &lt;\/nav&gt;\n    &lt;main&gt;\n      &lt;h1&gt;Welcome to my home page&lt;\/h1&gt;\n      &lt;p&gt;This is the main part of the page.&lt;\/p&gt;\n      &lt;h2&gt;To do list&lt;\/h2&gt;\n      &lt;ul&gt;\n        &lt;li&gt;Learn HTML&lt;\/li&gt;\n        &lt;li&gt;Learn CSS&lt;\/li&gt;\n        &lt;li&gt;Learn Javascript&lt;\/li&gt;\n        &lt;li&gt;Make a website&lt;\/li&gt;\n      &lt;\/ul&gt;\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=\"578\" height=\"551\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08135406\/html4.png\" alt=\"Example after adding ul and li tags\" class=\"wp-image-836\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08135406\/html4.png 578w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08135406\/html4-300x286.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><figcaption>Example after adding ul and li tags<\/figcaption><\/figure><\/div>\n\n\n\n<p>Much better.<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Style vs substance<\/h2>\n\n\n\n<p>If you&#8217;ve ever looked at HTML code before, you might have seen bold &lt;b&gt; or italic &lt;i&gt; tags.<\/p>\n\n\n\n<p>Of maybe you&#8217;ve seen strong &lt;strong&gt; or emphasis &lt;em&gt; tags.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"215\" height=\"183\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08140214\/html5.png\" alt=\"Bold vs strong, italic vs emphasis tags\" class=\"wp-image-838\" \/><figcaption>Bold vs strong, italic vs emphasis tags<\/figcaption><\/figure><\/div>\n\n\n\n<p>What&#8217;s the difference? They look the same. Bold and italic are just about making the text look different. Strong and emphasis place importance and emphasis on the text wrapped in the tags. Someone using a screen reader or a text to speech system because of visual impairments will have strong and emphasised words read out differently.<\/p>\n\n\n\n<p>It is best to either forget about &lt;b&gt; and &lt;i&gt; tags, or think of them as a short hand notation for styling text. You could get the same effect using the &lt;span&gt; tag with some CSS.<\/p>\n\n\n\n<p>The &lt;span&gt; tag is an inline container used to mark up a part of a text, or a part of a document. They can be easily styled by CSS or manipulated with JavaScript using the class or id attribute.<\/p>\n\n\n\n<p>The &lt;span&gt; tag is much like the &lt;div&gt; element, but &lt;div&gt; is a block-level element and &lt;span&gt; is an inline element.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"217\" height=\"258\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/03\/08140934\/html6.png\" alt=\"Span tag mimicking bold and italic\" class=\"wp-image-839\" \/><figcaption>Span tag mimicking bold and italic<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>&lt;p&gt;This is a &lt;b&gt;bold&lt;\/b&gt; tag&lt;\/p&gt;\n&lt;p&gt;This is a &lt;strong&gt;strong&lt;\/strong&gt; tag&lt;\/p&gt;\n&lt;p&gt;This is a &lt;span style=\"font-weight:bold\"&gt;span&lt;\/span&gt; tag&lt;\/p&gt;\n&lt;p&gt;This is an &lt;i&gt;italic&lt;\/i&gt; tag&lt;\/p&gt;\n&lt;p&gt;This is an &lt;em&gt;emphasis&lt;\/em&gt; tag&lt;\/p&gt;\n&lt;p&gt;This is a &lt;span style=\"font-style:italic\"&gt;span&lt;\/span&gt; tag&lt;\/p&gt;<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>Basically, use HTML to categorise the content of a website. Use CSS to style the content. Your HTML is just saying &#8220;This is a menu&#8221;, &#8220;This is a block of text&#8221; and so on. <\/p>\n\n\n\n<p class=\"nextlink\"><a href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/authoring-a-website\/week-1\/html-multimedia\/\" data-type=\"page\" data-id=\"843\">Next: HTML multimedia<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The &lt;a&gt; tag defines a hyperlink, which is used to link from one page to another. It isn&#8217;t just used for text, you can put an anchor around anything, but I&#8217;m introducing it here so we can use it in the menu. The most important attribute of the &lt;a&gt; element is the href attribute, which&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/authoring-a-website\/week-1\/html-text\/\">Continue reading <span class=\"screen-reader-text\">HTML text<\/span><\/a><\/p>\n","protected":false},"author":5710,"featured_media":0,"parent":54,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-829","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/829","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=829"}],"version-history":[{"count":10,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/829\/revisions"}],"predecessor-version":[{"id":847,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/829\/revisions\/847"}],"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=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}