HTML Tags

A website mainly uses three languages: HTML, CSS and JavaScript. The one of these that contributes with actual blocks of content is HTML. Think of HTML as lego bricks where you need all the pieces before you can make it pretty. We use tags to create each element.

<main> Defines the main content area of the page.
<header> Represents introductory content or navigation.
<footer> Represents closing or summary content.
<aside> Contains tangential or side content.
<div> A generic container used for grouping and styling.
<article> Represents a self-contained piece of content.
<section> Groups related content into thematic sections.
<hgroup> Groups multiple headings (rarely used today).
<details> / <summary> Creates an expandable/collapsible content block.
<fieldset> / <legend> Groups form controls with a caption.
<table> / <tr> / <td> Defines tabular data and its rows and cells.
<abbr> Marks an abbreviation and can provide a full form.
<code> Displays inline code or technical text.
<pre> Preserves whitespace and formatting for code blocks.
<h1>-<h6> Defines headings of decreasing importance.
<p> Represents a paragraph of text.
<span> An inline container for styling or grouping text.
<ul> / <ol> / <li> Creates unordered lists, ordered lists, and list items.
<iframe> Embeds another webpage or external content.
<img> Displays an image using a source URL.
<picture> Provides responsive images with multiple sources.
<audio> Embeds audio content with optional controls.
<video> Embeds video content with optional controls.
<button> A clickable button, often used with forms or scripts.
<form> Collects user input and sends it to a server.
<input> Creates interactive fields like text boxes or checkboxes.
<script> Adds or loads JavaScript for interactivity.
<meta> Provides metadata such as charset, viewport, or SEO info.