Photo AI

Last Updated Sep 27, 2025

HTML Simplified Revision Notes

Revision notes with simplified explanations to understand HTML quickly and effectively.

user avatar
user avatar
user avatar
user avatar
user avatar

402+ students studying

HTML

Overview

HTML (Hypertext Markup Language) is the foundational language used to create and structure web pages. HTML allows developers to add elements like text, images, links, and forms to web pages and structure them in a way that browsers can interpret and display for users. A good understanding of HTML is essential for building websites and is complemented by other technologies like CSS for styling and JavaScript for interactivity.

Purpose of HTML

  • Structure: HTML provides the structure for web content, allowing developers to organise information hierarchically.
  • Display: Browsers interpret HTML tags to display web content, creating a user-friendly interface from the raw code.
  • Accessibility: HTML tags support features that make web content accessible to all users, including screen readers for visually impaired users.

HTML Elements and Tags

  • HTML consists of tags that define different elements on a webpage.
  • Tags are written within angle brackets, like <tagname>, and most tags have an opening <tagname> and a closing </tagname>.

Common tags (based on Appendix 5d) include:

  • <html>: Root tag for an HTML document.
  • <head>: Contains meta-information about the document (like the title or links to CSS files).
  • <title>: Sets the title of the webpage, displayed in the browser tab.
  • <body>: Contains all the visible content of a webpage, such as text, images, and links.
  • <h1>, <h2>, <h3>: Define headings, with <h1> as the largest and <h3> as a smaller subheading.
  • <img>: Displays an image; commonly includes attributes like src (image source URL), alt (alternative text), height, and width.
  • <a>: Creates hyperlinks; uses the href attribute to define the link destination.
  • <div>: Creates a division or section of the page, often used for layout purposes.
  • <form>: Defines an HTML form for user input.
  • <input>: Specifies an input field within a form, such as text boxes or submit buttons.
  • <p>: Defines a paragraph of text.
  • <ul> and <ol>: Define unordered (bulleted) and ordered (numbered) lists, with <li> as list items.
  • <script>: Embeds JavaScript code within HTML.

Basic HTML Document Structure

<!DOCTYPE html>
<html>
  <head>
    <title>My Webpage</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <h1>Welcome to My Webpage</h1>
    <p>This is a paragraph of text on my webpage.</p>
    <img src="image.jpg" alt="Sample image" width="500" height="300">
    <a href="<https://example.com>">Visit Example</a>
  </body>
</html>

Explanation:

  • The <!DOCTYPE html> declaration defines the document as HTML5.
  • The <html> element wraps the entire HTML document.
  • The <head> section contains metadata and links, such as the <title> and <link> tags.
  • The <body> section includes all visible content, such as headings, text, images, and links.

Writing and Interpreting HTML Code

HTML code is straightforward, with tags that organise and describe elements. Familiarity with common tags and attributes enables you to read, write, and modify HTML documents effectively.

infoNote

For example:

<h1>About Us</h1>
<p>Welcome to our website! We are committed to providing quality service.</p>
<a href="contact.html">Contact Us</a>

This code defines a heading with <h1>, a paragraph with <p>, and a hyperlink to the "Contact Us" page with <a href="contact.html">.

Benefits and Drawbacks of HTML

Benefits:

  • Universal Compatibility: HTML is supported by all modern browsers.
  • Easy to Learn: The syntax is straightforward, making it accessible for beginners.
  • Flexible Structure: HTML can be combined with CSS for styling and JavaScript for interactivity.

Drawbacks:

  • Limited Styling: HTML alone cannot style content; it requires CSS.
  • No Interactivity: HTML is static and doesn't handle dynamic content without JavaScript or server-side languages.

Example of Using HTML and JavaScript

Client-Side Validation with JavaScript:

<form>
  <label for="username">Username:</label>
  <input type="text" id="username" name="username">
  <input type="submit" value="Submit" onclick="validateForm()">
</form>
<script>
  function validateForm() {
    let username = document.getElementById("username").value;
    if (username === "") {
      alert("Username cannot be empty");
      return false;
    }
    return true;
  }
</script>

Explanation: The JavaScript function validateForm checks if the username field is empty before submitting the form, helping ensure required fields are filled in.

Note Summary

infoNote

Common Mistakes

  • Forgetting Closing Tags: HTML tags generally have opening and closing tags; forgetting a closing tag can break the structure.
  • Misusing Attributes: Ensure attributes like src, href, and alt are used correctly within their tags to avoid broken images, links, or accessibility issues.
  • Incorrect Nesting: Certain tags should be nested properly (e.g., <li> tags must be inside <ul> or <ol> lists).
infoNote

Key Takeaways

  • HTML Purpose: HTML structures content for display in a web browser, forming the foundation of all web pages.
  • Common Tags: Familiar tags include <html>, <head>, <body>, <h1> to <h3>, <p>, <img>, <a>, <div>, <form>, and <input>.
  • Working with HTML: Writing, reading, and amending HTML is essential for creating webpages.
Books

Only available for registered users.

Sign up now to view the full note, or log in if you already have an account!

500K+ Students Use These Powerful Tools to Master HTML

Enhance your understanding with flashcards, quizzes, and exams—designed to help you grasp key concepts, reinforce learning, and master any topic with confidence!

160 flashcards

Flashcards on HTML

Revise key concepts with interactive flashcards.

Try Computer Science Flashcards

16 quizzes

Quizzes on HTML

Test your knowledge with fun and engaging quizzes.

Try Computer Science Quizzes

29 questions

Exam questions on HTML

Boost your confidence with real exam questions.

Try Computer Science Questions

27 exams created

Exam Builder on HTML

Create custom exams across topics for better practice!

Try Computer Science exam builder

12 papers

Past Papers on HTML

Practice past papers to reinforce exam experience.

Try Computer Science Past Papers

Other Revision Notes related to HTML you should explore

Discover More Revision Notes Related to HTML to Deepen Your Understanding and Improve Your Mastery

96%

114 rated

Web Technologies

Search Engine Indexing

user avatar
user avatar
user avatar
user avatar
user avatar

229+ studying

184KViews

96%

114 rated

Web Technologies

PageRank Algorithm

user avatar
user avatar
user avatar
user avatar
user avatar

376+ studying

182KViews

96%

114 rated

Web Technologies

Server Side & Client Side Processing

user avatar
user avatar
user avatar
user avatar
user avatar

468+ studying

180KViews

96%

114 rated

Web Technologies

CSS

user avatar
user avatar
user avatar
user avatar
user avatar

272+ studying

200KViews
Load more notes

Join 500,000+ A-Level students using SimpleStudy...

Join Thousands of A-Level Students Using SimpleStudy to Learn Smarter, Stay Organized, and Boost Their Grades with Confidence!

97% of Students

Report Improved Results

98% of Students

Recommend to friends

500,000+

Students Supported

50 Million+

Questions answered