Introduction to HTML by Manjeet Sir

HTML is a markup language that structures web content. Think of it as the skeleton of a website.

html-logo

html-logo

What is HTML and what it stands for?

HTML (HyperText Markup Language) is the standardized markup language used to create the structure and presentation of web pages. Think of it as the semantic skeleton of a website: it organizes content (like text, images, and links) using a system of tags and attributes to define its purpose and relationship to other elements.

History of HTML

  • 1991 - Birth of HTML
    • Created by Tim Berners-Lee at CERN
    • Problem: Scientists needed to share documents easily
    • Solution: HTML made documents linkable and shareable
  • 1995-1999 - HTML 2.0 to 4.01
    • Added forms, tables, colors
    • Websites became more interactive
  • 2014 - HTML5 (Current Standard)
    • Revolutionary update after 15 years
    • Built-in video/audio (no Flash needed!)
    • Mobile-friendly design
    • Better for modern web apps

Difference Between HTML 4 and HTML5

Feature HTML4 (Legacy Standard) HTML5 (Modern Standard) SEO & Development Impact
DOCTYPE Declaration Long & complex (e.g., specifying DTD URLs) Short & simple: <!DOCTYPE html> Simplicity & Consistency: Triggers modern browser standards mode quickly.
Structural Tags (Semantics) Generic <div> and <span> tags used for all structure. Semantic Tags: <header>, <nav>, <section>, <article>, <footer>. Crucial for SEO: Helps search engines understand content context and hierarchy, leading to better indexing.
Multimedia Support Requires third-party browser plugins (e.g., Flash Player or Silverlight) to embed video/audio. Native Tags: <video> and <audio> for direct embedding. Performance & Mobile: Eliminates plugin reliance, improving page load speed and mobile compatibility (key ranking factors).
Mobile/Responsive Design Poor native support; often required separate mobile sites. Excellent: Designed for cross-platform compatibility and works seamlessly with CSS3 for responsive layouts. Core Ranking Factor: Mobile-friendliness is essential for high search rankings.
Forms & Validation Basic input types; relies heavily on JavaScript for input validation. Advanced Input Types: email, date, number, color, etc., with built-in validation. User Experience (UX): Improves form usability and reduces errors, which leads to better conversion rates.
Graphics Relied on external plugins. Native support with **<canvas>** (for dynamic graphics) and **<svg>** (for vector graphics). Flexibility: Enables complex interactions and graphics without third-party dependencies.

How does HTML Code looks like ?

html - index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First Awesome Webpage!</title>
    </head>

<body>
    <header>
        <h1>Welcome to My Awesome HTML Adventure!</h1>
        </header>

    <nav>
        <ul>
            <li><a href="#about">About Me</a></li>
            <li><a href="#hobbies">My Hobbies</a></li>
            <li><a href="https://www.example.com" target="_blank">A Cool Website (Opens in new tab)</a></li>
            </ul>
    </nav>

    <main>
        <section id="about">
            <h2>About Me</h2>
            <p>Hi there! I'm an 11-year-old student excited to learn about web development.</p>
            <p>I love learning new things, especially about computers!</p>
            <img src="https://via.placeholder.com/150" alt="A placeholder image for a student learning coding">
            </section>

        <section id="hobbies">
            <h2>My Hobbies</h2>
            <p>When I'm not studying, I enjoy:</p>
            <ul>
                <li>Playing video games 🎮</li>
                <li>Reading adventure books 📚</li>
                <li>Drawing cool pictures 🎨</li>
            </ul>
        </section>

        <article>
            <h3>A Little Fun Fact!</h3>
            <p>Did you know that the first website ever went online in 1991?</p>
            <p>It was created by Tim Berners-Lee, who invented the World Wide Web!</p>
            <p>That's even older than your parents!</p>
        </article>

    </main>

    <footer>
        <p>&copy; 2023 My Awesome Webpage. All rights reserved.</p>
        <p>Made with excitement by a student developer!</p>
    </footer>

</body>

</html>
AvengersAgeOfUltron.webp

Frequently Asked Questions

It stands for Hypertext markup Language.

We need HTML to make the layout of our website.