More About HTML
Rehanuz Zaman
Founder & Executive Director at Mindy | Innovation Strategist | Idea Consultant | Brain Stormer | ICCCAD Youth Fellow
If you’re new to web development or just curious about how websites are built, you’ve probably heard of HTML. But what exactly is HTML, and how does it work? In this blog, we’ll break down everything you need to know about HTML and its newer version, HTML5, in a simple and beginner-friendly way. By the end, you’ll have a solid understanding of the basics and be ready to start creating your own web pages!
What is HTML?
HTML stands for HyperText Markup Language. It’s the standard language used to create and structure content on the web. Think of it as the skeleton of a website—it defines the structure, layout, and elements like text, images, and links.
HTML5 is the latest version of HTML, and it comes with new features and improvements that make it easier to create modern, interactive websites. Let’s dive into the key differences between HTML and HTML5.
HTML5 vs HTML – What’s New?
HTML5 introduced several new features that weren’t available in older versions of HTML. Here are some of the most important ones:
Explore HTML5 Semantic Tags
HTML5 introduced semantic tags that make it easier to structure your web pages. These tags describe the purpose of the content, making your code more readable and accessible. Here are some key semantic tags:
Example:
html
Copy
<header>
<h1>Welcome to My Website</h1>
<nav>
<a href="#home">Home</a> | <a href="#about">About</a>
</nav>
</header>
<main>
<article>
<h2>My First Blog Post</h2>
<p>Published on <time datetime="2023-10-01">October 1, 2023</time>.</p>
</article>
</main>
<footer>
<p>© 2023 My Website</p>
</footer>
Run HTML
HTML Forms – Collecting User Input
Forms are essential for collecting user input, like login details, feedback, or survey responses. Here are the key elements of an HTML form:
Example:
html
Copy
<form>
<fieldset>
<legend>Personal Info</legend>
<label for="name">Name:</label>
<input type="text" id="name" name="name"><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br>
</fieldset>
<label for="message">Message:</label>
<textarea id="message" name="message"></textarea><br>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
</form>
Run HTML
HTML Tables – Organizing Data
Tables are used to display data in rows and columns. Here are the key tags for creating tables:
Example:
html
领英推荐
Copy
<table>
<caption>Monthly Sales</caption>
<thead>
<tr>
<th>Month</th>
<th>Sales</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$1000</td>
</tr>
<tr>
<td>February</td>
<td>$1500</td>
</tr>
</tbody>
</table>
Run HTML
Navigation – Creating a Simple Navbar
Navigation is crucial for helping users move around your website. You can create a simple navbar using the <nav> tag and internal links.
Example:
html
Copy
<nav>
<a href="index.html">Home</a> |
<a href="about.html">About</a> |
<a href="contact.html">Contact</a>
</nav>
Run HTML
(Optional) Nested Mega Menu
For more advanced navigation, you can create a nested mega menu that appears on mouseover. This requires HTML, CSS, and JavaScript.
Explore HTML Tags
There are many HTML tags, but here are some essential ones:
Explore HTML Attributes
HTML attributes provide additional information about elements. Some common ones include:
HTML Overview – Summary and Practice Task
By now, you should have a good understanding of HTML basics. Here’s a quick summary:
Practice Task: Create a simple webpage with a header, navigation bar, a form, and a table.
Block vs Inline Elements
HTML is the foundation of web development, and learning it is the first step toward building your own websites. With HTML5, you have even more tools to create modern, interactive, and accessible web pages. Start practicing today, and soon you’ll be on your way to becoming a web development pro!
Happy coding! ??