Home : Basic HTML/CSS tutorial : Basic HTML : Summary
Simple tags
Boilerplate HTML
< Previous: Boilerplate HTML


HTML is a simple language based on text and tags.

Tags are short words or codes, inside triangle brackets. They usually occur in pairs; a closing tag has the same word as the starting tag, but begins with a / symbol (within the triangle brackets). Whatever text or tags occurs between the opening and closing tags is contained by the tags, and is affected by the meaning of the tags.

Some useful tags are H1 (marks a top-level heading), P (marks a paragraph of text), and TITLE (gives a title to the Web page).

Some tags - !DOCTYPE, HTML, HEAD, and BODY - are included in all web pages. These specify the type of the document and divide it into two sections (the heading and body), but it isn't important to completely understand these tags.

Try it for yourself

Individual exercise

Based on the example site, try to create a page about yourself using a text editor. Begin with your name as the heading. Write a short paragraph underneath that, giving your date and place of birth and where you currently live.

Save the file and make sure its name ends with ".html". (If you use Windows, you'll have to make Windows show file extensions: from a folder window, choose "View", "Options", then the "View" tab, and make sure the checkbox "Hide extensions for known file types" is not checked. After this, you may need to rename your file so that it ends with ".html".)

Then drag it into your Web browser to view it. Drag it back into your text editor to correct any mistakes.

Once you've achieved that, try to extend the page slightly. Create two subheadings (for example, "appearance" and "occupation"), and write a paragraph of text under each one. You can use the H2 tag for subheadings; it works exactly like the H1 tag.