HTML Structure — The Building Blocks of Web Pages
HTML uses TAGS in angle brackets to mark up content. Most tags come in pairs: an opening tag and a closing tag. <h1>Hello</h1> tells the browser "this is a top-level heading saying Hello." Without HTML, browsers wouldn't know what is a title vs paragraph vs picture.
Common tags. <h1> through <h6> for headings (h1 = biggest). <p> for paragraphs. <a href="..."> for links. <img src="..."> for images. <ul> and <li> for unordered lists. <ol> and <li> for ordered (numbered) lists. <div> for generic boxes. <button> for buttons. <form> and <input> for user input.
Which HTML creates a clickable link to https://example.com?
Every HTML document follows a structure: <!DOCTYPE html>, then <html>, with <head> (metadata, title, links to CSS) and <body> (visible content). Indenting nested elements helps you read the code. Modern code editors auto-format and auto-complete tags as you type.
Build a Page
In any text editor, type: <!DOCTYPE html><html><head><title>My First Page</title></head><body><h1>Hi!</h1><p>I made this.</p></body></html>. Save as "test.html" and double-click to open in your browser.
HTML is forgiving — even messy HTML usually displays. But neat HTML is easier to debug, share, and grow into bigger sites. Start practicing the tag patterns now.
Want to keep learning?
Sign up for free to access the full curriculum — all subjects, all ages.
Start Learning Free