Introduction To HTML
Introduction To HTML
HTML (HyperText Markup Language) is the basic building block for creating
websites. It defines the structure of a webpage using elements known as "tags."
These tags tell the browser how to display content like text, images, and links.
Learning HTML is essential for anyone who wants to create web pages, and it's easy
to start with simple tools like Notepad or TextEdit.
Attributes in HTML
HTML elements can have attributes that provide additional information. For
example:
href: Specifies the URL for a link.
src: Provides the file path for an image.
alt: Describes the content of an image for accessibility.
Key Takeaways
HTML is used to structure web pages.
Tags and attributes are the core components.
You can view and edit HTML using simple tools, and changes are visible in any
web browser.
Activity 1: Short Answer Questions (5 Questions)
1. What does HTML stand for?
2. What is the purpose of the <head> section in an HTML document?
3. Name two common HTML elements used to structure text.
4. What is the difference between <h1> and <h6> tags?
5. How do you create a hyperlink in HTML?
o b) <!DOCTYPE html>
o c) <head>
o d) <body>
o b) <h1>
o c) <br>
o d) <div>
o d) Image format
o b) <a href="URL">
o c) <img src="URL">
o d) <url>
o b) <h4>
o c) <h7>
o d) <h6>
o b) <h3>
o c) <h6>
o d) <p>
o b) <link>
o c) <url>
o d) <href>
2. Add an image to the webpage using the <img> tag. Make sure to include the
alt attribute describing the image.
3. Create a link to your favorite website (e.g., YouTube) using the <a> tag.
3. Create a webpage with multiple paragraphs, and add a line break between
each one using the <br> tag. Ensure there is also a link that takes the user to
a different section of the same webpage.
4. Write an HTML page that uses an <iframe> to embed a YouTube video, and
also contains a table with two columns and three rows, where you describe
different web browsers and their key features.
(Detailed Question)
Explain the difference between an ordered list (<ol>) and an unordered list (<ul>)
in HTML. Provide an example of each.
(Practical)
Create a webpage with:
A heading that says "My Favorite Foods"
An unordered list (<ul>) containing at least 3 items (foods).
A paragraph below the list explaining why you like those foods.
(Simple Question)
What does the alt attribute in the <img> tag do?
(Detailed Question)
How would you structure an HTML page that includes metadata, a heading, and a
paragraph? Write out the necessary code.
(Practical)
Create a simple webpage with:
A title "My Portfolio"
A heading that says "About Me"
A paragraph describing yourself.
(Simple Question)
What is the purpose of the <title> element in an HTML document?
(Detailed Question)
Describe how you would create a link in HTML that opens in a new browser tab.
Include an example code.
(Simple Question)
Which tag is used to define a line break in HTML?
(Practical)
Design an HTML page with:
A heading that says "My Favorite Websites"
Three links to websites you visit regularly (use the <a> tag).
(Simple Question)
What is the correct syntax for adding an image to a webpage using the <img> tag?