What is HTML?
HTML(Hypertext Markup Language) is the standard language for creating and designing web pages.
Basic Structure of an HTML Document
Every HTML document has a basic structure that includes the <!DOCTYPE>
,<html>
, <head>
, and <body>
.
What are HTML tags ?
HTML tags are the building blocks of HTML documents, used to create and define content and structure on web pages.
Here is a list of some commonly used HTML tags along with their purposes:
Basic Tags
<!DOCTYPE html>
: Declares the document type and version of HTML.
<html>
: Root element of an HTML document.
<head>
: Contains meta-information about the document (e.g., title, meta tags).
<title>
: Sets the title of the document, shown in the browser's title bar or tab.
<body>
: Contains the main content of the document.
Text Formatting Tags
<h1> to <h6>
: Defines HTML headings, <h1>
being the highest and <h6>
the lowest.
<p>
: Defines a paragraph.
<br>
: Inserts a line break.
<hr>
: Inserts a horizontal rule (line).
<strong>
: Defines important text (bold).
<em>
: Defines emphasized text (italic).
Links and Images
<a>
: Defines a hyperlink.
<img>
: Embeds an image.
Lists
<ul>
: Defines an unordered list.
<ol>
: Defines an ordered list.
<li>
: Defines a list item.
Tables
<table>
: Defines a table.
<tr>
: Defines a table row.
<th>
: Defines a table header cell.
<td>
: Defines a table data cell.
Forms
<form>
: Defines an HTML form for user input.
<input>
: Defines an input field.
<textarea>
: Defines a multi-line text input control.
<button>
: Defines a clickable button.
<select>
: Defines a drop-down list.
<option>
: Defines an option in a drop-down list.
Semantic HTML5 Tags
<header>
: Defines a header for a document or section.
<nav>
: Defines navigation links.
<section>
: Defines a section in a document.
<article>
: Defines an independent, self-contained content.
<aside>
: Defines content aside from the main content.
<footer>
: Defines a footer for a document or section.
Document Metadata
<meta>
: Provides metadata about the HTML document (e.g., charset, author, description).
<link>
: Defines the relationship between the document and an external resource (e.g., stylesheet).
Media Tags
<video>
: Embeds a video.
<audio>
: Embeds sound content.
<source>
: Specifies multiple media resources for
Top comments (0)