← Back to quizzesFree quiz

Fundamentals of HTML Structure and Tags

Welcome to this comprehensive course on the basics of HTML . Whether you are a beginner web developer or refreshing your knowledge, this guide will walk you through the most essential HTML…

10 questions~5 min
Fundamentals of HTML Structure and Tags — Qwi
0 / 10
Score: 0%
1

Which HTML element defines the title displayed on the browser tab?

2

In a hyperlink, which attribute specifies the destination URL?

3

What is the correct HTML tag to create a numbered (ordered) list?

4

Which attribute must be added to an tag to open the link in a new browser tab?

5

If you want to underline text, which HTML tag should you use?

6

Which HTML element is used to embed an image that does not have a closing tag?

7

Which tag creates a table row inside a element?

8

To change the background color of a table to white, which attribute is used?

9

Which HTML tag defines a level‑3 heading?

10

When creating a link that points to a page within the same site, which type of hyperlink is used?

Fundamentals of HTML Structure and Tags

Welcome to this comprehensive course on the basics of HTML. Whether you are a beginner web developer or refreshing your knowledge, this guide will walk you through the most essential HTML elements, attributes, and best practices. By the end of the lesson you will be able to create well‑structured pages, add links, lists, images, and tables, and understand how to control their behavior with attributes.

1. The <title> Element – What Appears on the Browser Tab

The <title> tag lives inside the <head> section of an HTML document. It defines the text that browsers display on the tab and is also used by search engines as the primary page title. Because of its SEO impact, keep the title concise (50‑60 characters) and include relevant keywords.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Fundamentals of HTML Structure</title>
  </head>
  <body>
    ...
  </body>
</html>

2. Hyperlinks and the href Attribute

Links are created with the <a> (anchor) element. The href attribute tells the browser where to navigate when the user clicks the link. Without href, the anchor behaves like plain text.

  • Basic link: <a href="https://example.com">Visit Example</a>
  • Link to an internal page: <a href="about.html">About Us</a>

3. Opening Links in a New Tab – The target="_blank" Attribute

To make a link open in a new browser tab, add target="_blank" to the <a> tag. For security, pair it with rel="noopener noreferrer" to prevent the new page from accessing the original window object.

<a href="https://external.com" target="_blank" rel="noopener noreferrer">External Site</a>

Key points to remember:

  • Use target to control where the link opens.
  • _blank creates a new tab or window.
  • Combine with rel for security.

4. Creating Ordered and Unordered Lists

HTML provides two primary list types:

  • Ordered list – uses the <ol> tag and automatically numbers each <li> item.
  • Unordered list – uses the <ul> tag and displays bullet points.
<ol>
  <li>First step</li>
  <li>Second step</li>
</ol>

<ul>
  <li>Apples</li>
  <li>Oranges</li>
</ul>

5. Underlining Text – The <u> Tag

While modern CSS is preferred for styling, the historic <u> element still exists to underline text semantically. Use it sparingly and consider text-decoration: underline; in CSS for greater flexibility.

<p>This is <u>underlined</u> text.</p>

6. Embedding Images – The Self‑Closing <img> Tag

Images are added with the <img> element, which does not require a closing tag. Always provide an alt attribute for accessibility and SEO.

<img src="logo.png" alt="Company Logo" width="200">

Tip: Optimize image file size and use descriptive alt text to improve page load speed and search rankings.

7. Building Tables – Rows, Cells, and Styling

Tables are structured with a hierarchy of tags:

  • <table> – the container.
  • <tr> – defines a table row.
  • <th> – header cell (bold and centered by default).
  • <td> – regular data cell.
<table border="1" bgcolor="white">
  <tr>
    <th>Name</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Alice</td>
    <td>30</td>
  </tr>
</table>

The legacy bgcolor attribute can set a table’s background color, though inline CSS (style="background:white;") is more flexible for modern projects.

8. SEO Best Practices for HTML Basics

When mastering HTML fundamentals, keep these SEO guidelines in mind:

  • Use descriptive titles – include primary keywords near the beginning of the <title> tag.
  • Write meaningful alt text for images; search engines read alt attributes to understand visual content.
  • Structure content with headings (<h2>, <h3>, etc.) to create a logical hierarchy.
  • Prefer semantic tags (<nav>, <section>, <article>) over generic <div> when possible.
  • Minimize inline styling and use external CSS files to keep HTML clean and improve page speed.

9. Quick Recap – Key Takeaways

  • The <title> tag defines the browser tab text and is crucial for SEO.
  • Hyperlinks rely on the href attribute; add target="_blank" to open in a new tab.
  • Use <ol> for numbered lists and <ul> for bullet points.
  • Underline text with <u> (or CSS) and embed images with the self‑closing <img> tag.
  • Table rows are created with <tr>; set background color with bgcolor or CSS.

By integrating these core HTML concepts into your daily coding practice, you’ll build pages that are both user‑friendly and search‑engine friendly. Keep experimenting, validate your markup with the W3C validator, and watch your web development skills grow.