Photo AI
Last Updated Sep 27, 2025
Revision notes with simplified explanations to understand HTML quickly and effectively.
429+ students studying
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.
<tagname>
, and most tags have an opening <tagname>
and a closing </tagname>
.<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.<!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>
<!DOCTYPE html>
declaration defines the document as HTML5.<html>
element wraps the entire HTML document.<head>
section contains metadata and links, such as the <title>
and <link>
tags.<body>
section includes all visible content, such as headings, text, images, and links.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.
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">
.
<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.
src
, href
, and alt
are used correctly within their tags to avoid broken images, links, or accessibility issues.<li>
tags must be inside <ul>
or <ol>
lists).<html>
, <head>
, <body>
, <h1>
to <h3>
, <p>
, <img>
, <a>
, <div>
, <form>
, and <input>
.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 Flashcards16 quizzes
Quizzes on HTML
Test your knowledge with fun and engaging quizzes.
Try Computer Science Quizzes29 questions
Exam questions on HTML
Boost your confidence with real exam questions.
Try Computer Science Questions27 exams created
Exam Builder on HTML
Create custom exams across topics for better practice!
Try Computer Science exam builder12 papers
Past Papers on HTML
Practice past papers to reinforce exam experience.
Try Computer Science Past PapersDiscover More Revision Notes Related to HTML to Deepen Your Understanding and Improve Your Mastery
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!
Report Improved Results
Recommend to friends
Students Supported
Questions answered