HyperText Markup Language
HyperText Markup Language (HTML) describes web resources. It lays out the structure of a page and determines what content will appear. It's important to note that HTML is not considered a programming language, but a markup language, which means it describes how to render text.
HTML uses the concept of elements to describe content. A tag is a keyword wrapped in angle brackets < >. For example, the most fundamental HTML tag is <html>
, which identifies the beginning of an HTML document. Likewise, the </html>
closing tag is used to define the document's end. An opening tag, it's corresponding closing tag, and the content between it is called an element.
Tag | Description |
---|---|
<html> |
Defines the beginning and end of an HTML document. |
<head> |
Contains metadata about the document, for example the page's title. |
<header> |
Defines the beginning and end of an introductory section of the page. Usually contains a summary or abstract. |
<body> |
Defines the beginning and end of most of the page's content. |
<a> |
Defines an anchor. The most common use case for <a> is to flag a hyperlink, which is a clickable section of text that links to another resource or performs some action. For example, the superscript number following this sentence is a hyperlink.2 |
<p> |
Defines the start of a paragraph. |
<style> |
Inputs internal Cascading Styles Sheets (CSS) directly inside the HTML. |
<script> |
Inputs JavaScript directly inside the HTML. |
<img> |
Defines an image. |
<form> |
Defines a form where the user can input information. It is one of the primary ways in which users can send data to a web application from their browser. Forms are most often implemented via POST requests, and are extremely important for security because they might allow untrusted input. If input isn't properly validated or sanitized, it could result in unintended code injection or execution. |
<input> |
Defines a field where a user can input data. A form, for example, usually contains multiple input elements. This is particularly significant for two reasons. |
Relevant Note(s): Markdown