Summary of HTML tags
β Basic HTML Structure Tags
Tag | Description |
---|---|
<!DOCTYPE html> | Declares the document type (HTML5). |
<html> | Root element of an HTML page. |
<head> | Contains meta information about the document. |
<title> | Sets the title of the document (shown in browser tab). |
<body> | Contains the content displayed on the web page. |
π’ Text Formatting Tags
Tag | Description |
---|---|
<h1> to <h6> | Headings from largest (<h1> ) to smallest (<h6> ). |
<p> | Paragraph of text. |
<br> | Line break (no closing tag). |
<hr> | Horizontal rule (divider line). |
<strong> | Bold text (semantic emphasis). |
<em> | Italic text (emphasized). |
<b> | Bold text (visual only). |
<i> | Italic text (visual only). |
<u> | Underlined text. |
π Links and Media Tags
Tag | Description |
---|---|
<a> | Hyperlink (href attribute used). |
<img> | Displays an image (src , alt ). |
<video> | Embeds a video. |
<audio> | Embeds audio. |
π§Ύ List Tags
Tag | Description |
---|---|
<ul> | Unordered (bulleted) list. |
<ol> | Ordered (numbered) list. |
<li> | List item (used inside <ul> or <ol> ). |
π§© Layout and Grouping Tags
Tag | Description |
---|---|
<div> | Division/block element (for grouping). |
<span> | Inline container (for styling small parts). |
<header> | Represents page or section header. |
<footer> | Represents page or section footer. |
<nav> | Navigation links section. |
<main> | Main content of the document. |
<section> | A thematic grouping of content. |
<article> | Independent, self-contained content. |
π Table Tags
Tag | Description |
---|---|
<table> | Defines a table. |
<tr> | Table row. |
<th> | Table header cell (bold & centered). |
<td> | Table data cell. |
<caption> | Table caption (title). |
π Form and Input Tags
Tag | Description |
---|---|
<form> | Creates an input form. |
<input> | Input field (text, radio, checkbox, etc.). |
<label> | Defines a label for input. |
<textarea> | Multi-line text input. |
<select> | Drop-down list. |
<option> | Option in drop-down. |
<button> | Clickable button. |
π¬ Other Useful Tags
Tag | Description |
---|---|
<meta> | Metadata (e.g., character set, viewport). |
<link> | Links external resources (like CSS). |
<script> | Embeds JavaScript. |
<!-- comment --> | Adds a comment (not displayed). |
Comments
Post a Comment