You are currently viewing HTML Essentials: Building Blocks of the Web

HTML Essentials: Building Blocks of the Web

HTML-course || HTML Basics

Welcome to the HTML Basics guide! Learn HTML essentials to get started in frontend development. This document will introduce you to the fundamentals of HTML (Hypertext Markup Language), the standard language for creating web pages.

Introduction to HTML

HTML is a markup language used to structure content on the web. It consists of elements represented by tags that define the structure of a web page.

HTML Document Structure

A basic HTML document structure includes the following:

<!DOCTYPE html>
    <title>Document Title</title>
    <!-- Content goes here -->

HTML Elements
Elements are the building blocks of HTML. They are represented by tags.

  1. Paragraph
<p>This is a paragraph.</p>
  1. Image
<img src="" alt="Description">

#The image can be fetched from the local server or from a remote server.
  1. Headings
    HTML provides heading tags from h1 to h6 for defining headings.
<h1> Heading one </h1>  
<h2> Heading one </h2>
<h3> Heading one </h3>
<h4> Heading one </h4>
<h5> Heading one </h5>
<h6> Heading one </h6>
#Best SEO practices recommends 1 H1 tag for each page.
#Other heading levels should be distributed as needed. 
  1. Lists – Use ul for unordered lists and ol for ordered lists. li represents list items.

Unordered list

    <li>Item 1</li>
    <li>Item 2</li>

Ordered List

    <li>Item 1</li>
    <li>Item 2</li>
  1. Links – Links provide a link/path to another resource. Create hyperlinks using the tag:
<a href="">Visit Dynamic Technologies</a>
  1. Forms – HTML forms allow user input into a website.
<form method="" action="">
    <label for="username">Username:</label>
    <input type="text" id="username" name="username">
    <button type="submit">Submit</button>
  1. Inputs – Website users use input fields to provide information.
<input type="text">
<input type="password">
<input type="radio">
<input type="checkbox">
<input type="submit">
<input type="reset">
<input type="file">
<input type="date">
<input type="email">
<input type="url">
<input type="number">
<input type="range">
<input type="color">
  1. Tables – Create tables with the <table>, <tr>, <th>, and <td> tags.
        <th>Header 1</th>
        <th>Header 2</th>
        <td>Row 1, Cell 1</td>
        <td>Row 1, Cell 2</td>
  1. div – Users use the div tag to group related elements, facilitating easier styling.
<p> some paragraph </p>
<h1> Heading 1 </h1>
<p> more content and or tags </p>
#For styling purposes, all other elements are grouped into divs. 

HTML5 tags

Use semantic elements like <header>, <nav>, <article>, <section>, <footer>, etc., to add meaning to the content.

<!-- To enclose header content -->
<!-- To enclose navigation bar content -->
<!-- To enclose general content -->
<!-- To enclose the footer content -->

HTML Comments

Comments are important in any language. They help explain whatever is happening. The rest of the code executes without executing comments.

<!--Single Line comment-->

This is a multiline
comment in HTML.

Make a donation to support us

For web development services, SEO services, Digital marketing strategies, website set up services, web hosting and domain registration; contact Dynamic Technologies.

Related articles: