Recent Post

Wednesday, 20 August 2025

CBSE Class 8 Notes - Chapter 6: Introduction to HTML

CBSE Class 8 Notes - Chapter 6: Introduction to HTML | Pratap Sanjay Sir
Introduction to HTML

1. Introduction to HTML

  1. HTML stands for HyperText Markup Language.
  2. It is the standard language used to create and design webpages.
  3. HTML is not a programming language, it is a markup language used to structure content.
  4. HTML uses tags to define elements (like headings, paragraphs, images, links, etc.).
  5. Web browsers (Chrome, Edge, Firefox) read HTML and display the content accordingly.

2. Features of HTML

  1. Simple and easy to learn.
  2. Platform-independent (runs on any operating system).
  3. Provides structure to web pages.
  4. Supports multimedia (images, audio, video).
  5. Works with CSS for styling and JavaScript for interactivity.
  6. Supported by all modern browsers.

3. Structure of an HTML Document

Every HTML page has a basic structure as shown below:

<!DOCTYPE html>
<html>
  <head>
    <title>Page Title</title>
    <meta charset="UTF-8">
  </head>
  <body>
    <h1>Hello World!</h1>
    <p>This is my first webpage.</p>
  </body>
</html>
  • <!DOCTYPE html> → Defines the document type (HTML5).
  • <html>...</html> → Root element of the document.
  • <head>...</head> → Contains metadata (title, styles, scripts).
  • <body>...</body> → Contains visible page content.

4. Commonly Used HTML Tags

Tag Meaning Example
<h1> to <h6> Headings (largest to smallest) <h1>Welcome</h1>
<p> Paragraph <p>This is a paragraph</p>
<a href="">...</a> Hyperlink <a href="https://www.cbse.gov.in">CBSE</a>
<img src="" alt=""> Image <img src="image.jpg" alt="pic">
<br> Line Break Hello<br>World
<ul> <li>...</li> </ul> Unordered List <ul>
<li>Apple</li>
<li>Mango</li>
</ul>

5. Attributes in HTML

  1. Attributes provide extra information about HTML tags.
  2. They are always written inside the opening tag.
  3. Attributes are written as name="value".
  4. Examples:
    • <img src="pic.jpg" width="200" height="150">
    • <a href="https://google.com" target="_blank">Google</a>

6. Lists in HTML

  1. Ordered List (ol) → Numbered list.
  2. Unordered List (ul) → Bulleted list.
  3. Definition List (dl, dt, dd) → Terms with definitions.

7. Example HTML Page

<!DOCTYPE html>
<html>
<head>
  <title>My First Webpage</title>
</head>
<body>
  <h1>Welcome to HTML</h1>
  <p>This is a simple webpage created using HTML.</p>

  <h2>My Favorite Fruits</h2>
  <ul>
    <li>Apple</li>
    <li>Mango</li>
    <li>Banana</li>
  </ul>

  <img src="fruit.jpg" alt="Fruits" width="200"><br>

  <a href="https://www.google.com" target="_blank">Visit Google</a>
</body>
</html>

8. Importance of HTML

  1. Backbone of all web pages.
  2. Defines the structure of websites.
  3. Works with CSS & JavaScript to make websites attractive and interactive.
  4. Universal standard supported by all browsers.
Chapter 6: Introduction to HTML Que. & Ans.
Click here to access all Questions & Answers
Visit Now ⤴
🔔 Subscribe to My Channel

No comments:

"कोशिश करो तो सब कुछ हो सकता है, न करो तो कुछ नहीं हो सकता।"