<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Yasmin </title>
    <description>The latest articles on Forem by Yasmin  (@yasinthecloud).</description>
    <link>https://forem.com/yasinthecloud</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F480805%2Fd2a00b8c-c3a2-439e-b9d6-8e972468e689.jpeg</url>
      <title>Forem: Yasmin </title>
      <link>https://forem.com/yasinthecloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yasinthecloud"/>
    <language>en</language>
    <item>
      <title>Back to Basics: HTML for 'Code Newbies'</title>
      <dc:creator>Yasmin </dc:creator>
      <pubDate>Sat, 10 Oct 2020 03:45:46 +0000</pubDate>
      <link>https://forem.com/yasinthecloud/back-to-basics-html-for-codenewbies-40aa</link>
      <guid>https://forem.com/yasinthecloud/back-to-basics-html-for-codenewbies-40aa</guid>
      <description>&lt;p&gt;&lt;em&gt;Seeing as this is my first technical blog post ever, please do let me know what you thought of it 🤗&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is HTML?
&lt;/h3&gt;

&lt;p&gt;HTML stands for &lt;em&gt;&lt;strong&gt;Hypertext Markup Language&lt;/strong&gt;&lt;/em&gt; and its primary function is to specify the webpage structure - you can think of it as the skeleton of the webpage.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTML syntax
&lt;/h3&gt;

&lt;p&gt;The building blocks of HTML are called &lt;strong&gt;elements&lt;/strong&gt;. The anatomy of a HTML element is as follows: an opening tag, followed by content, and finally a matching closing tag. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt; are presented using the angled open &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt; and closed &lt;code&gt;&amp;lt;/&amp;gt;&lt;/code&gt; brackets. Note that closed brackets typically contain a backslash. When you open a tag, you must always close it. &lt;strong&gt;Important&lt;/strong&gt;: some tags such as &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; are self-closing as they have no content therefore don't require a closing tag.&lt;/p&gt;

&lt;p&gt;HTML tags can be extended using HTML &lt;strong&gt;attributes&lt;/strong&gt;. Attributes provide additional information that affects how the browser interprets the element. Attributes are typically written in the &lt;code&gt;name="value"&lt;/code&gt; form.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tags and Attributes
&lt;/h3&gt;

&lt;p&gt;There are countless amounts of tags and attributes than you need to remember, but if you're interested you can refer to the links below.&lt;/p&gt;

&lt;p&gt;Tags reference list: &lt;a href="https://www.w3schools.com/tags/ref_byfunc.asp"&gt;https://www.w3schools.com/tags/ref_byfunc.asp&lt;/a&gt; &lt;br&gt;
Attributes reference list: &lt;a href="https://www.w3schools.com/tags/ref_attributes.asp"&gt;https://www.w3schools.com/tags/ref_attributes.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nevertheless, there are a few commonly used tags you should familiarise yourself with. These include:&lt;br&gt;
&lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;header&amp;gt;&amp;lt;/header&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;ol&amp;gt;&amp;lt;/ol&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Similarly, there are a few commonly used attributes you should also familiarise yourself with:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;class&lt;/code&gt;&lt;br&gt;
&lt;code&gt;id&lt;/code&gt;&lt;br&gt;
&lt;code&gt;href&lt;/code&gt;&lt;br&gt;
&lt;code&gt;src&lt;/code&gt; &lt;br&gt;
&lt;code&gt;height&lt;/code&gt;&lt;br&gt;
&lt;code&gt;width&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, we've covered some of the basics of HTML, let's look at how you would construct an element using &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; (paragraph) tag and a &lt;code&gt;class&lt;/code&gt; attribute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p class="nice"&amp;gt; Hello World! &amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, in order for you to see this code being rendered on the webpage, there is one more thing you need to do. You need to place it inside a HTML boilerplate (basic template).&lt;/p&gt;

&lt;h3&gt;
  
  
  HTML5 Boilerplate - the bigger picture
&lt;/h3&gt;

&lt;p&gt;Here is a HTML5 boilerplate. This is a basic template you would need in an editor like VS Code in order to execute and render HTML on a webpage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt; 
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;title&amp;gt;My First Line of Code&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
  &amp;lt;p class="nice"&amp;gt; Hello World! &amp;lt;/p&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pUPqR9vU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/put-link-to-image-here" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pUPqR9vU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/put-link-to-image-here" alt="Output of code saying Hello World!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;!DOCTYPE HTML&amp;gt;&lt;/code&gt; tells the browser/parser what type of document it is looking at - in this case HTML. &lt;br&gt;
&lt;code&gt;&amp;lt;HTML&amp;gt;&lt;/code&gt; all the HTML we want the browser to pick should be within these tags. &lt;br&gt;
&lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; is where all the metadata is kept. You can also add titles that will appear on the tab of your browser. &lt;br&gt;
&lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; is where all the content goes, for example the &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Top tip&lt;/strong&gt;: ensure to save your HTML code in this format &lt;em&gt;nameOfFile.html&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: in case you're confused about HTML5, it is just the latest version of HTML.&lt;/p&gt;

&lt;p&gt;Now you have a good foundational knowledge of HTML, go and practice!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>html</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
