DEV Community

Cover image for HTML Basics Explained Simply: A Beginner's Guide to Web Development
AYOMIDE JONES
AYOMIDE JONES

Posted on • Updated on

HTML Basics Explained Simply: A Beginner's Guide to Web Development

**

INTRODUCTION

**
Are you new to the world of web development and interested in learning HTML? Look no further! This comprehensive guide provides a simple and easy-to-understand explanation of HTML (HyperText Markup Language). Whether you're exploring a career in tech or simply curious about website development, this beginner-friendly article will help you grasp the fundamentals of HTML. Let's dive in!

Section 1: Understanding HyperText and Markup Languages

What is HyperText?
HyperText refers to text that contains links or references to other pieces of text, typically in the form of clickable links on electronic devices. HyperText enables a web of interconnected information, allowing users to follow links and access related topics or additional resources. Unlike reading a book sequentially, hypertext allows non-linear navigation, providing quick access to specific information.

Markup vs. Markdown Languages: Markup languages, such as HTML, are designed to add extra instructions or "marks" to text for formatting and displaying purposes. These marks tell computers or other programs how to present the content. Markup languages provide structured formatting, ensuring consistent rendering across platforms. They also offer accessibility features, making web content accessible to people with disabilities.

Markup Snippet(HTML)

<h1>Welcome to HTML Basics Explained</h1>
<p>This is a paragraph of HTML.</p>
<img src="image.jpg" alt="An image">
<a href="https://example.com">Click here</a> to visit the website.

Enter fullscreen mode Exit fullscreen mode

On the other hand, markdown languages, although simpler with plain text, are more suitable for quick note-taking or blogging. However, their lack of structured formatting and limited accessibility support make them less ideal for building web pages.

Markdown Snippet

# Welcome to HTML Basics Explained
This is a paragraph of HTML.

![An image](image.jpg)

[Click here](https://example.com) to visit the website.

Enter fullscreen mode Exit fullscreen mode

Section 2: Demystifying HTML

HTML forms the backbone of the World Wide Web by enabling content creators to build web pages with various digital elements. It allows the inclusion of links, documents, images, videos, and other types of content.

In this article, we embark on an exciting journey to learn about HTML. By the end of this adventure, you'll understand what HTML is and how it contributes to the web. Welcome to the magical world of HTML!

HTML is like a magical box of instructions that tells your computer how to create and display elements on a web page. It uses special codes called "tags" to create different elements. For example, the <h1> tag makes text look big and important, while the <img> tag shows images on the web page.

Story book

A web page is like a storybook, composed of different parts such as titles, images, and footnotes. HTML helps organize these parts, starting with the <html> tag, which acts as the cover of the storybook. Inside the <html> tag, we have the <body> section, which represents the pages where all the exciting things happen.

HTML allows us to add words and headings to our web page using tags like <p> for paragraphs and <h1> to <h6> for different heading sizes. These tags provide structure and meaning to our words, just like chapters in a storybook. The tags are characterized into opening and closing tags, although some elements are self closing and such do not need a separate closing tag.

<p> This is an element with an opening and closing tag </>

"/" separates an opening tag from closing tag
Enter fullscreen mode Exit fullscreen mode

We can add images to our web page using the <img> tag, similar to placing a photo in a storybook. Links, represented by the <a> tag, act as secret paths that take us to other web pages or different parts of the same page.

<img src="link to the image" />

This is a self closing tag
Enter fullscreen mode Exit fullscreen mode

HTML also allows us to make our web page visually appealing by adding styles. Special tags can change the color, size, and style of our text, resembling painting and decorating a storybook with different colors and fonts.

Here are other tags and features of HTML to explore.

  • Title Tag: The tag defines the title of the web page and appears in the browser's title bar or tab. It's crucial for Search Engine Optimization (SEO) of your webpage as search engines often display the title tag in search results. It should accurately describe the content of the page and include relevant keywords.
<head>
  <title>My HTML Website - Home</title>
</head>

Enter fullscreen mode Exit fullscreen mode
  • Meta Description: The tag with the name="description" attribute provides a brief summary of the web page's content. It doesn't directly affect search engine rankings but can impact click-through rates when displayed in search results. Include relevant keywords and make it enticing to encourage users to click.
<head>
  <meta name="description" content="Welcome to My HTML Website! We offer top-notch web development services. Contact us for a free consultation.">
</head>

Enter fullscreen mode Exit fullscreen mode
  • Heading Tags: In addition to <h1> to <h6>, proper use of heading tags (<h1> being the most important) helps search engines understand the structure and hierarchy of your content. Use headings to organize your page and include relevant keywords.
<body>
  <h1>Main Heading</h1>
  <h2>Subheading</h2>
  <h3>Sub-subheading</h3>
</body>

Enter fullscreen mode Exit fullscreen mode
  • Image Alt Attribute: The alt attribute in the <img> tag specifies alternative text for an image. It is important for accessibility and SEO. Search engines rely on alt text to understand what the image represents. Use descriptive alt text with relevant keywords.
<img src="image.jpg" alt="A person working on a laptop - Web Development">

Enter fullscreen mode Exit fullscreen mode
  • Hyperlinks (Internal and External): The <a> tag creates hyperlinks. Internal links connect different pages within your website, while external links point to other websites. Use meaningful anchor text that describes the linked page or content. Linking to relevant and reputable sources can improve SEO.
<a href="about.html">About</a>  <!-- Internal link -->
<a href="https://example.com">External Website</a>  <!-- External link -->

Enter fullscreen mode Exit fullscreen mode
  • Semantic HTML: Semantic HTML tags provide meaning and structure to the content. Search engines use these tags to better understand your web page. Some important semantic tags include <header>, <nav>, <section>, <article>, <aside>, and <footer>. Use them appropriately to organize and structure your content.
<header>
  <h1>Welcome to My Website</h1>
</header>

<nav>
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
  </ul>
</nav>

<section>
  <h2>Featured Products</h2>
  <!-- Product details -->
</section>

<article>
  <h2>Blog Post Title</h2>
  <!-- Blog post content -->
</article>

<footer>
  <p>&copy; 2023 My Website. All rights reserved.</p>
</footer>

Enter fullscreen mode Exit fullscreen mode
  • Canonical URL:If you have multiple versions of a page (e.g., different URLs for the same content), use the rel="canonical" attribute to specify the preferred version. This helps search engines understand which version to consider for indexing and ranking.
<head>
  <link rel="canonical" href="https://example.com/article">
</head>

Enter fullscreen mode Exit fullscreen mode
  • Schema Markup: Schema.org provides a collection of tags that help search engines understand the context of your content. It enables rich snippets in search results, such as showing star ratings for product reviews or displaying event details. Use schema markup to enhance the visibility and relevance of your page.
<body itemscope itemtype="https://schema.org/Article">
  <h1 itemprop="headline">Article Title</h1>
  <p>Article content goes here.</p>
  <time itemprop="datePublished" datetime="2023-05-26">May 26, 2023</time>
</body>

Enter fullscreen mode Exit fullscreen mode

Practical Example
Here is a practical example of HTML in a real life project

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My HTML website - Home</title>
</head>
<body>
  <header>
    <h1>Welcome to My Home Page</h1>
  </header>

  <nav>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Services</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </nav>

  <section>
    <h2>About Me</h2>
    <p>Hello, I am a web developer with a passion for HTML, CSS, and JavaScript. I love creating user-friendly and interactive web experiences.</p>
    <img src="profile.jpg" alt="Profile Picture">
  </section>

  <section>
    <h2>Services</h2>
    <ul>
      <li>Web Design</li>
      <li>Front-end Development</li>
      <li>Responsive Layouts</li>
    </ul>
  </section>

  <footer>
    <p>&copy; 2023 My Website. All rights reserved.</p>
  </footer>
</body>
</html>

Enter fullscreen mode Exit fullscreen mode

**

CONCLUSION

**
HTML is an extraordinary language that empowers us to create stunning web pages and effectively structure content. Whether you're a beginner exploring HTML for the first time or on a path toward software engineering, this guide has laid a strong foundation for your HTML journey. Happy coding!

Here are a few beginner-friendly resources to help you learn HTML:

1. Mozilla Developer Network(MDN): Their HTML basics guide is a great starting point for beginners. You can access it here:

HTML basics - Learn web development | MDN

HTML (HyperText Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables. As the title suggests, this article will give you a basic understanding of HTML and its functions.

favicon developer.mozilla.org
  1. Freecodecamp: Their Responsive Web Design Certification is a great curriculum to start working with HTML. It aims to teach you by building a cat photo app. Their Introduction to HTML course is also a great resource. It covers the fundamentals of HTML and includes hands-on coding exercises. https://www.freecodecamp.org/learn/2022/responsive-web-design/

  2. Codeacademy: They have an interactive learning platform with guided lessons on HTML. You can access their Learn HTML course here:

  3. W3Schools: Their HTML tutorial covers all you need to know about HTML. You can access it here:

  4. HTML Dog: HTML Dog provides a beginner friendly tutorial on HTML. You can access it here:

Here are great articles and videos to support your learnings.

  1. "HTML Basics for Beginners" by freeCodeCamp: Please find the link here.

    Learn HTML Basics for Beginners in Just 15 Minutes

    If you want to build a website, the first language that you need to learn is HTML. In this article, we are going to go through the basics of HTML. At the end, we are going to build a basic website using only HTML. Here's a video you

    favicon freecodecamp.org
  2. "HTML Crash Course For Absolute Beginners" by Traversy Media: Please find the link here.

  3. "The Basics of HTML" by HTML.com: Please find the link here.

    HTML For Beginners The Easy Way: Start Learning HTML & CSS Today ยป

    Learn how to code HTML & CSS for free at HTML.com. We've HTML tutorials & reference guides on tags, attributes and everything else you need to master HTML.

    favicon html.com

Remember, practice is key to mastering HTML. Start building your own web pages, experiment, and have fun while learning. If you find this article helpful, feel free to follow me for more tech-related content. Best of luck on your tech journey!

Happy coding!

Top comments (0)