HTML Summary Worksheet
1. What is HTML?
HTML stands for HyperText Markup Language.
It is used to create and design web pages by using special tags.
2. Writing HTML with Notepad
Steps:
1. Open Notepad.
2. Type your HTML code.
3. Click File → Save As.
4. In File name, write: [Link]
5. In Save as type, select All Files.
6. Click Save.
7. Double-click the file to open it in your browser.
3. Basic HTML Tags
Tag Description Example
<html> Start/end of the HTML <html> ... </html>
page
<head> Info about the page (not <head> ... </head>
shown on screen)
<title> Page title (seen in browser <title>My Page</title>
tab)
<body> Content seen on the page <body text="black"
bgcolor="lightblue"
topmargin="20"
leftmargin="30"> ...
</body>
<p> Paragraph <p>This is a
paragraph.</p>
<h1> to <h6> Headings (h1 is largest) <h1>Heading</h1>
<b> Bold text <b>Bold</b>
<i> Italic text <i>Italic</i>
<u> Underlined text <u>Underline</u>
<br> Line break Line1<br>Line2
<hr> Horizontal line <hr>
<!-- comment --> Comment (not displayed) <!-- My comment -->
4. Example HTML Page
5.
Practice Questions
A. Fill in the blanks:
1. HTML stands for __________.
2. To save your HTML file, use the extension __________.
3. The tag to make text bold is __________.
4. The tag that makes a line break is __________.
5. Comments in HTML start with __________.
B. Write the code for the following:
1. A heading that says “Welcome Students” using <h2>
2. A paragraph that says “This is our first web lesson.”
3. A horizontal line
4. A line with bold text “Important” and a line break after it
HTML Exercise: “My First Page”
Part A: Fill in the blanks
Complete the HTML code below by filling in the missing tags.
<_____>
<____>
<title>My First Page</title>
</_____>
<body text="black" bgcolor="lightyellow" topmargin="20" leftmargin="30">
<__>Hello World</__>
<__>This is a paragraph.</__>
<__>Bold</__><br>
<__>Italic</__><br>
<__>Underline</__>
<__>
<!-- ____________ -->
</body>
</_____>
Part B: Find and fix the errors
Here’s a version of the HTML code with some mistakes. Circle or underline the errors and correct them.
<html>
<head>
<title>My First Page<title>
</head>
<body text=black bgcolor=lightyellow topmargin="20" leftmargin="30">
<h1>Hello World</h1>
<p>This is a paragraph.
<b>Bold<b><br>
<i>Italic</i><br>
<u>Underline</u>
<hr>
<-- This is a comment -->
</body>
</html>
Part C: Label the tags
Look at the HTML snippet below. Write what each tag does on the blank lines.
<h1>Hello</h1> → ________________________
<b>Text</b> → ________________________
<i>Italic</i> → ________________________
<hr> → ________________________
<!-- Note --> → ________________________