<?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>DEV Community: Lahitan</title>
    <description>The latest articles on DEV Community by Lahitan (@lahitan).</description>
    <link>https://dev.to/lahitan</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%2F948491%2F25dfcb7e-6989-42f0-b1f7-1c34464abb9e.png</url>
      <title>DEV Community: Lahitan</title>
      <link>https://dev.to/lahitan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lahitan"/>
    <language>en</language>
    <item>
      <title>A Guide to Mastering HTML as a beginner</title>
      <dc:creator>Lahitan</dc:creator>
      <pubDate>Thu, 19 Oct 2023 22:00:01 +0000</pubDate>
      <link>https://dev.to/lahitan/a-guide-to-mastering-html-as-a-beginner-5b3h</link>
      <guid>https://dev.to/lahitan/a-guide-to-mastering-html-as-a-beginner-5b3h</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Building a website is easy, the first language you need to learn is &lt;strong&gt;HTML&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By the end of this article, you should have a basic knowledge of HTML,which you need to build a website.&lt;/p&gt;

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

&lt;p&gt;Hyper Text Markup Language(HTML), is the first building block of a webpage. The markup tells the web browser how to display text, images and videos on a webpage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Brief History of HTML
&lt;/h2&gt;

&lt;p&gt;HTML has been around for a very long time, it was written by a British scientist named Berners-Lee. HTML has gone through different versions&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML 1.O&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was released year 1993.&lt;/li&gt;
&lt;li&gt;It had minimal features and functionality.&lt;/li&gt;
&lt;li&gt;Users could only use twenty elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML 2.0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was released year 1995&lt;/li&gt;
&lt;li&gt;The Users could change background colors, text-colors, and other formatting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML 3.0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was released year 1997.&lt;/li&gt;
&lt;li&gt;The Users got friendly with HTML and started using it more frequently.&lt;/li&gt;
&lt;li&gt;Improved tables, text formatting, and image alignment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML 4.0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was released year 1999.&lt;/li&gt;
&lt;li&gt;They added features like frames for dividing the browser window into sections.&lt;/li&gt;
&lt;li&gt;The Users had more control.&lt;/li&gt;
&lt;li&gt;Improved accessibity.&lt;/li&gt;
&lt;li&gt;Implemented support for external styling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML 5.0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It was released year 2014.&lt;/li&gt;
&lt;li&gt;It is the current and latest version.&lt;/li&gt;
&lt;li&gt;It works even when not connected to the internet.&lt;/li&gt;
&lt;li&gt;Support of multimedia ( audio and video). &lt;/li&gt;
&lt;li&gt;Support of Canvas for graphics.&lt;/li&gt;
&lt;li&gt;Improved forms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What can HTML Do?
&lt;/h2&gt;

&lt;p&gt;HTML has been used widely, and can do variety of things which includes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;HTML is used for creating pages, which is displayed on the World Wide Web(www).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML is used to navigate the web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML is used for including images,and videos to a web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML5 allows users to browse a website, while offline by retaining data on the user's machine. ( This allows your web application to continue functioning even after connection drops.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML5 can bring reality of game development possible.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How Does HTML Works
&lt;/h2&gt;

&lt;p&gt;HTML uses tags enclosed in (&amp;lt;&amp;gt;) to define elements like headings. It start with an opening tag (&amp;lt;&amp;gt;) and ends with a closing tag (&amp;lt;/&amp;gt;).&lt;/p&gt;

&lt;p&gt;The tags provides instructions to the web browser on how to display the content.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's Talk About Tags
&lt;/h3&gt;

&lt;p&gt;Tags are enclosed in angle brackets &lt;code&gt;&amp;lt;tag name&amp;gt;&lt;/code&gt;, each tag defines different parts of the web page, and there are lots of tag used in HTML.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic HTML Tags
&lt;/h3&gt;

&lt;p&gt;To build a website, there are some tags to get familiar with, which I would be dividing into groups.&lt;/p&gt;

&lt;h4&gt;
  
  
  HTML Tags
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Doctype:&lt;/strong&gt; It is used to define the document type, it instructs the website to use the latest version of HTML.&lt;br&gt;
&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Html:&lt;/strong&gt; It is the roof of all codes, are wrapped around it.&lt;br&gt;
&lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Head:&lt;/strong&gt; The head tag comes next, it doesn't contain any text, but contains tags like title, meta, styles, and links.&lt;br&gt;
&lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; This tag gives title to your web page, it comes under the head tag. Only text can be written inside this tag.&lt;br&gt;
&lt;code&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Body:&lt;/strong&gt; The content of the website is written under the body tag, and it comes after the head tag.&lt;br&gt;
&lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuijoh4948kgeldnqmx1x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuijoh4948kgeldnqmx1x.jpg" alt="Image of HTML structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Sematic Tags for Structure
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Header:&lt;/strong&gt; This define the header of the web.&lt;br&gt;
&lt;code&gt;&amp;lt;header&amp;gt;&amp;lt;/header&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Nav:&lt;/strong&gt; This defines container for navigation.&lt;br&gt;
&lt;code&gt;&amp;lt;nav&amp;gt;&amp;lt;/nav&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Main:&lt;/strong&gt; This specifies the main page constant and should be unique.&lt;br&gt;
&lt;code&gt;&amp;lt;main&amp;gt;&amp;lt;/main&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Section:&lt;/strong&gt; This defines a section in a web.&lt;br&gt;
&lt;code&gt;&amp;lt;section&amp;gt;&amp;lt;/section&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Article:&lt;/strong&gt; This is the part containing information about the web.&lt;br&gt;
&lt;code&gt;&amp;lt;article&amp;gt;&amp;lt;/article&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Aside:&lt;/strong&gt; This is often placed as a side bar in a document.&lt;br&gt;
&lt;code&gt;&amp;lt;aside&amp;gt;&amp;lt;/aside&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Footer:&lt;/strong&gt; This is the last part of the web page.&lt;br&gt;
&lt;code&gt;&amp;lt;footer&amp;gt;&amp;lt;/footer&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  HTML Tags for Text
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Heading Tag:&lt;/strong&gt; This is used to create heading, and there are six heading tag in HTML.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Heading 1&amp;lt;/h1&amp;gt;
&amp;lt;h2&amp;gt;Heading 2&amp;lt;/h2&amp;gt;
&amp;lt;h3&amp;gt;Heading 3&amp;lt;/h3&amp;gt;
&amp;lt;h4&amp;gt;Heading 4&amp;lt;/h4&amp;gt;
&amp;lt;h5&amp;gt;Heading 5&amp;lt;/h5&amp;gt;
&amp;lt;h6&amp;gt;Heading 6&amp;lt;/h6&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Paragraph Tag:&lt;/strong&gt; This is used to define paragraphs in HTML&lt;br&gt;
&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Anchor Tag:&lt;/strong&gt; This is used to define link, it turns hyper-text to hyperlink.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href ="https://www.gmail.com"&amp;gt;Gmail&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; The Gmail in between the anchor tag would appear as a link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image Tag:&lt;/strong&gt; This tag is used to insert an image in HTML documents&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;img scr=" cat.png" alt=" cat image"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List Tag:&lt;/strong&gt; There are two types of list tag.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unordered List:&lt;/strong&gt; This is an unordered list in HTML.&lt;br&gt;
&lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ordered List:&lt;/strong&gt; This is an ordered List in HTML.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; The &lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt; tag is used to create the list item in between them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Unordered list
&amp;lt;ul&amp;gt;
  &amp;lt;li&amp;gt; item 1 &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt; item 2 &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt; item 3 &amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;

Ordered list
&amp;lt;ol&amp;gt;
  &amp;lt;li&amp;gt; item 1 &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt; item 2 &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt; item 3 &amp;lt;/li&amp;gt;
&amp;lt;/ol&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  HTML Tags for Table
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Table Tag:&lt;/strong&gt; This is used to define the table.&lt;br&gt;
&lt;code&gt;&amp;lt;table&amp;gt;&amp;lt;/table&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Table Body:&lt;/strong&gt; This is used to define the body of a table.&lt;br&gt;
&lt;code&gt;&amp;lt;tbody&amp;gt;&amp;lt;/tbody&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Table Head:&lt;/strong&gt; This is used to define the head of the table.&lt;br&gt;
&lt;code&gt;&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Table Row:&lt;/strong&gt; This is used to create row in the table.&lt;br&gt;
&lt;code&gt;&amp;lt;tr&amp;gt;&amp;lt;/tr&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Table Column:&lt;/strong&gt; This is used to define the column or a cell.&lt;br&gt;
&lt;code&gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Other HTML Tags
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Horizontal Tag:&lt;/strong&gt; This is used to create horizontal lines.&lt;br&gt;
&lt;code&gt;&amp;lt;hr&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Line Break Tag:&lt;/strong&gt; This is used to insert a line break.&lt;br&gt;
&lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; The horizontal, and line break tag doesn't require a closing tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Button Tag:&lt;/strong&gt; This is used to create buttons.&lt;br&gt;
&lt;code&gt;&amp;lt;button&amp;gt;&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Div Tag:&lt;/strong&gt; This is used to create division.&lt;br&gt;
&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Span Tag:&lt;/strong&gt; This is used to mark up a part of a text.&lt;br&gt;
&lt;code&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Inline and Block-level Elements
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Inline Elements:&lt;/strong&gt;  They only take up the width necessary, and does not start on a new line.&lt;br&gt;
Examples of inline HTML tags are &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, and more&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Block-level Elements:&lt;/strong&gt; They always take up the full width available, and always start on a new line.&lt;br&gt;
Examples of block-level HTML tags are &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, and more &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4l5r0iw439snfz2slqi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz4l5r0iw439snfz2slqi.png" alt="Inline Vs Block-level Elements"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Comment in HTML
&lt;/h2&gt;

&lt;p&gt;Comments is done using the tag&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;!--This is a comment--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Things to know about comments&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comment tag is used to insert comments in the source code.&lt;/li&gt;
&lt;li&gt;Comments are not displayed in the browser.&lt;/li&gt;
&lt;li&gt;Comment makes your code easy to read and edit.&lt;/li&gt;
&lt;li&gt;Comment can be used to explain your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Mistakes to Avoid as A Beginner
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Always start with the &lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt;, this would let the browser know, you are working with HTML5.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always close tags, that requires closing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use alt attribute, when using the image tag.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nest HTML tags properly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure to use be Sematic tag.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;HTML is a language, used to structure text, images, tables, and so on, on the website.&lt;/p&gt;

</description>
      <category>html</category>
      <category>beginners</category>
      <category>developer</category>
      <category>newbie</category>
    </item>
  </channel>
</rss>
