After finishing this tutorial, you will be capable of:
Tables, lists, and layout elements are the foundations of organized web content. When you comprehend how to use them, you can structure pages that present content clearly, are accessible, and also present a visually appealing page. Before CSS frameworks like Bootstrap arrived, developers utilized tables and divs as the primary means of controlling a website layout. These skills are still necessary to every web developer.
Tables are useful for presenting structured data, such as price lists, schedules, or reports. Tables are structured using <table>, <tr> (row), <th> (header), and <td> (data cell) tags.
<table border='1'>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Alice</td>
<td>22</td>
</tr>
</table>
Tip: Although you can add visible borders for practice using the ‘border’ attribute, when a web designer styles a table, they will do it using CSS.
Quick Recap — Tables
Use <table>, <tr>, <th>, and <td> for structure.
You can use colspan and rowspan to merge cells.
Use CSS for better control over the design of a table.
Lists are a way to show multiple items in an organized way. HTML supports three types of lists:
Example: Unordered List
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
Tip: Lists can help create neat navigation menus, or show steps in a process.
Quick Recap — Lists
Use <ul> or <ol> depending on order.
Use <dl> for definitions.
Links are used to connect different web pages. You can create links by simply using the <a> tag.
In HTML, elements behave differently whether they are block or inline.
Tip: Use block elements to create structure, use inline elements for styling within text.
Quick Recap—Block vs Inline
A <div> tag is used to group relevant HTML elements together. The ‘class’ and ‘id’ attributes allow you to apply CSS styling or act on elements with JavaScript.
<div class='info-box'>
<h2>About Us</h2>
<p>We create amazing websites for students.</p>
</div>
Tip: Use id for single use elements and class for reuse.
An <iframe> allows you to embed another web page or video into your current page.
<iframe src='https://www.wikipedia.org' width='400' height='250'></iframe>
Tip: Iframes are also great for including maps, videos, or forms without leaving the page.
File paths define the location of files you have linked (e.g., images or CSS). There are two types:
Divs and CSS are useful tools for building layouts that are flexible and responsive. This is often done nowadays using either Flexbox or Grid.
Example using Flexbox:
<div style='display:flex;'>
<div style='flex:1; background-color:lightblue;'>Left</div>
<div style='flex:1; background-color:lightgreen;'>Right</div>
</div>
Tip: Whenever you are designing, think of your design as responsive! That way, your site can look as great on mobile as it does on a desktop.
You learned how to:
These are fundamental building blocks for any web page.
HTML Tables — W3Schools: https://www.w3schools.com/html/html_tables.asp
HTML Lists — W3Schools: https://www.w3schools.com/html/html_lists.asp
HTML Block and Inline Elements — W3Schools: https://www.w3schools.com/html/html_blocks.asp
HTML Iframes — W3Schools: https://www.w3schools.com/html/html_iframe.asp
LeetCode HTML Practice: https://leetcode.com/problemset/
GeeksforGeeks HTML Tutorial: https://www.geeksforgeeks.org/html-tutorial/
It is best to use CSS Flexbox or Grid for laying out your page.
You can have multiple classes; ids are unique.
Tables are for tabular data; divs are for layout and they are more flexible and responsive.
HTML provides three types of lists —
Block elements (like <div>, <p>, <h1>) take up the full width of the page and start on a new line.
Inline elements (like <span>, <a>, <img>) only take up as much width as necessary and stay within the same line.
Copyright © 2025 Niotechone Software Solution Pvt. Ltd. All Rights Reserved.