Introduction to HTML
HTML stands for HyperText Markup Language and is the standard language used to create web pages. Every page you visit in a web browser — whether a news a...
What Is HTML and How Do Web Pages Work?
HTML stands for HyperText Markup Language and is the standard language used to create web pages. Every page you visit in a web browser — whether a news article, a video platform, or a school portal — is built using HTML at its core. HTML is not a programming language in the traditional sense; it is a markup language, meaning it uses special tags to describe the structure and content of a document.
A web browser like Chrome or Firefox reads an HTML file and renders it as a visual page. The browser does not show you the HTML tags themselves; it interprets them and displays formatted text, images, links, and other elements. This process is called parsing and rendering.
An HTML file is simply a plain text file saved with the extension .html. You can create one in Notepad (Windows) or any text editor. The basic structure of every HTML page follows this pattern: the document begins with <!DOCTYPE html> which tells the browser this is an HTML5 document. Then comes the <html> tag which wraps the entire page. Inside that are two main sections: <head> and <body>. The head contains metadata — information about the page that browsers and search engines use, including the title shown in the browser tab. The body contains everything users actually see on the page.
Example of a minimal HTML page: <!DOCTYPE html> <html> <head> <title>My First Page</title> </head> <body> <h1>Hello, World!</h1> <p>This is my first web page.</p> </body> </html>
When you open this file in a browser, you see a large heading "Hello, World!" and a paragraph below it. The tags themselves remain invisible.
Real-world connection: every time you visit a website, your browser downloads an HTML file from a web server somewhere in the world and renders it for you. Understanding HTML lets you look behind the visual surface of the web and understand how it actually functions.
Exam tip: CBSE Class 9 and 10 exams frequently ask students to identify which tag does what. Learn the purpose of the most common tags and be able to write a simple page structure from memory.
Essential HTML Tags: Structuring Text, Images, and Links
HTML tags come in pairs: an opening tag like <p> and a closing tag like </p>. The content between them is affected by that tag. Some tags are self-closing and do not need a closing tag — the <img> tag for images is an example. Tags can also carry attributes that provide extra information, written inside the opening tag as name="value" pairs.
Heading tags run from <h1> to <h6>. <h1> is the largest and most important heading; <h6> is the smallest. Search engines use heading hierarchy to understand what a page is about, so <h1> should describe the page's main topic. The <p> tag creates a paragraph. Browsers automatically add space above and below paragraphs. For line breaks without starting a new paragraph, use <br>.
Text formatting tags include <b> for bold and <i> for italic. HTML5 introduced <strong> (strong importance, displayed as bold) and <em> (emphasis, displayed as italic). The semantic tags <strong> and <em> are preferred in modern HTML because they carry meaning beyond just visual styling.
The anchor tag <a> creates hyperlinks. Its href attribute specifies where the link goes. Example: <a href="https://www.google.com">Search Google</a>. The text between the tags ("Search Google") becomes the clickable link text. Setting target="_blank" makes the link open in a new tab.
Images are inserted with <img src="photo.jpg" alt="A photo of a cat">. The src attribute gives the file path or URL of the image. The alt attribute provides alternative text that screen readers read aloud for visually impaired users and that browsers display if the image fails to load.
Lists are created with <ul> for unordered (bulleted) lists and <ol> for ordered (numbered) lists. Each item inside uses the <li> tag: <ul><li>Apple</li><li>Banana</li></ul>.
Exam tip: practise writing small HTML pages by hand without a code editor. CBSE board practical exams often provide a screenshot of a rendered page and ask you to write the HTML code that produces it. Know your tags cold.
HTML Tables and Forms: Organising Data and Collecting Input
Two of the most practically useful HTML structures are tables and forms. Tables organise data into rows and columns, making comparisons easy. Forms collect information from users — login credentials, search queries, survey responses, and online orders all depend on HTML forms.
An HTML table uses four main tags working together. The <table> tag wraps the entire table. The <tr> tag (table row) creates each horizontal row. Inside rows, <th> (table header) creates bold, centred header cells and <td> (table data) creates regular data cells. Example: <table> <tr><th>Name</th><th>Marks</th></tr> <tr><td>Priya</td><td>95</td></tr> <tr><td>Arjun</td><td>88</td></tr> </table>
The border attribute on the <table> tag adds visible lines: <table border="1">. You can merge cells across columns using colspan="2" or across rows using rowspan="2" inside a <td> or <th> tag. These merged cells are commonly seen in complex timetables and report cards.
Forms use the <form> tag to wrap all input elements. The action attribute tells the browser where to send the form data (usually a server-side script), and the method attribute specifies how — either "get" (data appended to the URL) or "post" (data sent in the request body, more secure for passwords). Common input elements include <input type="text"> for single-line text, <input type="password"> for masked password entry, <input type="radio"> for choosing one option from several, <input type="checkbox"> for selecting multiple options, and <select> with <option> tags for dropdown menus. A submit button is created with <input type="submit" value="Submit">.
Every input should have a <label> tag linked to it using the for attribute matching the input's id. This improves accessibility and allows users to click the label text to focus the input field.
Real-world use case: the login form on your school's online portal is built using exactly these HTML elements. When you type your username and password and click "Login," the form sends that data to the school's server, which checks it against a database.
Exam tip: CBSE exams test both the correctness of table structure and understanding of form elements. Double-check that every opened tag is properly closed and that your table has the same number of <td> cells in every row to avoid misaligned output.