HTML is the standard markup language used to create and structure web pages and web applications. It defines the content and layout of a web page by using a system of tags and attributes.
- Element: The basic building block of HTML, represented by tags that define the structure and content of the web page.
- Tags: Enclosed in angle brackets (< >), tags denote the beginning and end of elements. Examples:
<p>,<div>,<h1>,<a>, etc.
- Attributes provide additional information about an element and are specified within the start tag. Examples:
hrefin<a href="https://example.com">.
- <!DOCTYPE>: Declares the HTML version being used.
- : The root element of an HTML page.
- : Contains meta-information about the document, such as title, stylesheets, scripts, etc.
- : Contains the content of the web page, such as text, images, links, etc.
- Text Formatting:
<h1>to<h6>,<p>,<strong>,<em>,<span>. - Links and Images:
<a>,<img>. - Lists:
<ul>,<ol>,<li>. - Tables:
<table>,<tr>,<td>. - Forms:
<form>,<input>,<textarea>,<button>.
- Semantic HTML uses elements that clearly describe their meaning in a human- and machine-readable way (e.g.,
<header>,<nav>,<article>,<footer>).
- HTML5 introduced new elements like
<section>,<article>,<header>,<footer>,<nav>,<aside>, etc., for better structure and semantics.
HTML is fundamental to web development, providing the structure and content of web pages. It is supported by all browsers and forms the backbone of the World Wide Web.