ASWCode Tutorials

Learn Web Development - From Basics to Advanced

HTML Basics for Beginners

HTML (HyperText Markup Language) is the backbone of the web. It is a markup language used to structure content on the internet. With HTML, you define headings, paragraphs, links, images, tables, forms, and other elements that make up a web page.

HTML works together with CSS (for styling) and JavaScript (for interactivity) to create complete web experiences. Learning HTML is the first step in becoming a web developer.

1. HTML Document Structure

Every HTML document follows a standard structure. Let's look at the basic template:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>My First Page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my first web page.</p>
  </body>
</html>
    

Explanation:

2. Common HTML Tags

HTML provides a wide range of tags for structuring content. Here are some of the most common ones:

3. Example HTML Page

Here's a small example demonstrating headings, paragraphs, and links:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>ASWCode Example</title>
  </head>
  <body>
    <h1>Welcome to ASWCode</h1>
    <p>Learn coding with free tutorials and examples.</p>
    <a href="https://aswcode.com">Visit ASWCode</a>
  </body>
</html>
    

Tip: Always use semantic tags (like <header>, <footer>, <main>, <article>) as it improves accessibility and SEO.

Next Lesson → Understanding HTML Tags

← Back