HTML is the standard markup language used to create and design documents on the web. It's the basic building block for creating web pages and web applications. HTML uses a system of tags and attributes to structure content and define the elements on a webpage.
Basic HTML Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Crash Course</title>
</head>
<body>
<h1>HTML (Hypertext Markup Language)</h1>
<p>HTML is the standard markup language used to create and design documents on the web. It's the basic building
block for creating web pages and web applications.</p>
</body>
</html>
HTML Tags
HTML tags are keywords enclosed in angle brackets that define the structure of an HTML document. Tags come in pairs: an opening tag and a closing tag. The opening tag marks the beginning of an element, and the closing tag signifies the end of that element. For example:
<p>This is a paragraph.</p>
Here, <p>
is the opening tag, and </p>
is the closing tag, defining a paragraph element.
Categorized HTML Tags
Document Structure:-
<!DOCTYPE html>
: Document type declaration.
-
<html>
: Root element.
-
<head>
: Contains meta-information about the document.
-
<title>
: Sets the title of the document.
-
<body>
: Contains the content of the document.
-
<p>
:
Paragraph.
-
<h1> to <h6>
:
Headings (from largest to smallest).
-
<strong>
:
Strong importance (bold).
-
<em>
:
Emphasized text (italics).
-
<a>
:
Anchor (creates hyperlinks).
-
<span>
:
Inline container for styling.
Lists:
-
<ul>
: Unordered list.
-
<ol>
: Ordered list.
-
<li>
: List item.
Images and Multimedia:
-
<img>
: Embeds an image.
-
<audio>
: Embeds audio content.
-
<video>
: Embeds video content.
Tables:
-
<table>
: Defines a table.
-
<tr>
: Defines a table row.
-
<td>
: Defines a table cell.
Forms:
-
<form>
: Defines an HTML form.
-
<input>
: Input field.
-
<select>
: Dropdown list.
-
<textarea>
: Multiline text input.
-
<button>
: Clickable button.
Semantic Elements:
-
<header>
: Represents a header for a document or section.
-
<nav>
: Represents a navigation menu.
-
<article>
: Represents an independent piece of content.
-
<section>
: Represents a generic section in a document.
-
<footer>
: Represents a footer for a document or section.
-
<meta>
: Provides metadata about the HTML document.
These are just a few examples of HTML tags categorized by their purpose. HTML provides a versatile set of tags to structure content, create links, embed multimedia, and define the layout and style of a webpage. The combination and nesting of these tags allow developers to create rich and interactive web pages.
0 Comments