Activity 2 . HTML structure - VIII

Chapter 3: Introduction to HTML - Activity Page

Chapter 3: Introduction to HTML - Activity Page

Introduction

HTML (HyperText Markup Language) was developed by Tim Berners-Lee at CERN to help researchers share information. It started with HTML 1.0 and has now evolved to HTML5.01. HTML documents start with <html> and end with </html>.

Student Note: Think of HTML as the "skeleton" of a webpage. It gives structure to content!

Syntax of an HTML Document

<html>
    <!-- All the visible content and hidden information about the page goes here -->
</html>

Head Tags

  • <link> – Links external CSS.
  • <base> – Defines base URL.
  • <meta> – Adds meta info.
  • <script> – Connects JavaScript.
  • <style> – Internal CSS.
Student Note: The <head> is like the brain; the <body> is the part users see.

Advantages of HTML5

  • Supported by all modern browsers
  • Device friendly & easy to implement
  • Supports multimedia and vector graphics
  • Geolocation and audio/video support

Disadvantages of HTML5

  • Not supported in older browsers
  • Long coding time for complex pages

Tags in HTML5

TagDescription
<!DOCTYPE html>Defines the document as HTML5
<html>Root element of the document
<head>Meta information
<title>Title shown in browser tab
<body>Visible content
<h1> to <h6>Headings
<p>Paragraph
<br>Line break
<hr>Horizontal line
<!-- comment -->HTML Comment

Attributes

Attributes provide extra information about tags.

<tag attribute="value">Content</tag>
Student Note: Attributes are like adjectives for HTML tags!

HTML5 Document Structure

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Title here</title>
    </head>
    <body>
        Page content goes here.
    </body>
</html>
Explanation:
  • <!DOCTYPE html> defines HTML5
  • <html> is the root element
  • <head> contains meta info
  • <body> holds visible content

HTML Comments

Comments help document your code and are not shown on the webpage.

<!-- This is a comment -->
<!--
    Multi-line comment
    explaining code block
-->
Student Note: Use comments to keep your code clear and organized!

© 2025 HTML Learning Activities. All rights reserved.

Comments

Popular posts from this blog

Index Class V - Excel - ICT

Interactive Worksheet - Excel-V True or False- Quiz

Interactive Worksheet - Excel-V Fill-in-the-Blanks Quiz