TGViewer
Web Development - HTML, CSS & JavaScript Web Development - HTML, CSS & JavaScript @javascript_courses · 55.7K subscribers
Post #2340 3.35K
HTML Basics

HTML (HyperText Markup Language) is the foundation of web development. It is used to structure the content of a webpage using various elements and tags.

1. What is HTML?

HTML is a markup language that defines the structure of web pages.

It consists of elements represented by tags such as <p>, <h1>, <a>, etc.
Web browsers interpret HTML and display the content visually.

2. Basic Structure of an HTML Document

Every HTML page follows a standard structure:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Webpage</title>
</head>
<body>
    <h1>Welcome to Web Development</h1>
    <p>This is a paragraph of text.</p>
</body>
</html>


Explanation of the Structure:

<!DOCTYPE html> defines the document type as HTML5.
<html> is the root element that wraps all content.
<head> contains metadata like character encoding and page title.
<title> sets the name of the webpage, which appears in the browser tab.
<body> holds the visible content of the webpage.

3. Common HTML Tags and Their Uses

Headings (<h1> - <h6>) → Used to define headings, where <h1> is the largest and <h6> is the smallest.
Paragraph (<p>) → Represents a block of text.
Links (<a href="URL">) → Creates hyperlinks to other web pages or resources.
Images (<img src="image.jpg" alt="Description">) → Embeds images into the webpage.
Lists (<ul>, <ol>, <li>) → Used to create unordered (<ul>) and ordered (<ol>) lists.
Tables (<table>, <tr>, <td>) → Creates structured data tables.
Forms (<form>, <input>) → Collects user input such as text, emails, and passwords.

4. Practical Task: Create a Simple Webpage

Now, let’s build a simple personal profile page using what we’ve learned.

Task: Create a Personal Profile Page

Follow these steps:
Open a text editor (like VS Code or Notepad++).
Create a new file and save it as index.html.
Copy and paste the following code into the file.
Open the file in a browser to see the output.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Profile</title>
</head>
<body>
    <h1>Welcome to My Profile</h1>
    <p>Hello! My name is John Doe. I'm learning web development.</p>

    <h2>My Hobbies</h2>
    <ul>
        <li>Coding</li>
        <li>Reading</li>
        <li>Traveling</li>
    </ul>

    <h2>Contact Me</h2>
    <p>Email: <a href="mailto:john@example.com">john@example.com</a></p>
</body>
</html>

5. Next Steps:

Modify the page by adding your own details.
Experiment with adding an image using the <img> tag.
In the next lesson, we’ll explore HTML Forms and Semantic Elements to improve webpage structure.

Web Development Best Resources

Share with credits: https://t.me/webdevcoursefree

ENJOY LEARNING 👍👍
  • ❤ 8
  • 👍 2
More from @javascript_courses
  1. Oct 13, 2026𝗧𝗢𝗣 𝗙𝗥𝗘𝗘 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝗧𝗢 𝗕𝗢𝗢𝗦𝗧 𝗬𝗢𝗨𝗥 𝗦𝗞𝗜𝗟𝗟𝗦 𝗜𝗡 𝟮𝟬𝟮𝟲! Explor…
  2. Oct 12, 2026doesn't work because "a" is block-scoped. ⭐ 1️⃣5️⃣ What Is an Execution Context? When Java…
  3. Oct 12, 2026When "inner()" looks for: name it finds it in its own scope. For: city JavaScript looks in…
  4. Oct 12, 2026💻 JavaScript Roadmap 2026 — Part 9 🟡 Scope, Hoisting & Execution Context Now we're movin…
  5. Oct 12, 2026🚀 𝗪𝗵𝗶𝗰𝗵 𝗧𝗲𝗰𝗵 𝗦𝗸𝗶𝗹𝗹 𝗪𝗶𝗹𝗹 𝗬𝗼𝘂 𝗠𝗮𝘀𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟲? Want to buil…
  6. Oct 9, 2026🇮🇳 𝗚𝗢𝗩𝗘𝗥𝗡𝗠𝗘𝗡𝗧 𝗢𝗙 𝗜𝗡𝗗𝗜𝗔 — 𝗔𝗜𝗖𝗧𝗘 𝗜𝗡𝗧𝗘𝗥𝗡𝗦𝗛𝗜𝗣𝗦 𝟮𝟬𝟮𝟲 🚀…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →