Tabla de etiquetas HTML
Una etiqueta HTML suele definirse como un conjunto de caracteres que proporciona un comando con formato para una página web. Las etiquetas ofrecen instrucciones para la estructura y la presentación del contenido.
En los primeros tiempos, las etiquetas HTML eran responsables de la mayor parte del código web. Sin embargo, hoy su importancia ha disminuido.
Las etiquetas HTML incluyen etiquetas para encabezados o títulos, etiquetas para tablas, etiquetas para referencias, etc. Una etiqueta HTML tiene un nombre de etiqueta escrito entre corchetes angulares. Puede aparecer en pares que indican la etiqueta de apertura y la de cierre, las cuales enmarcan un texto, una determinada pieza de código u otras etiquetas. La etiqueta de apertura consta de un nombre que puede ir seguido de uno o más atributos. La etiqueta de cierre consta del mismo nombre precedido por una barra inclinada (/).
A continuación puedes encontrar una tabla de etiquetas HTML con breves descripciones.
Etiquetas básicas
| Tag | Description |
|---|---|
| <!DOCTYPE> | Sets the type of the document. |
<html> | Sets an HTML document. |
<head> | Contains general information (metadata) about the document. |
<title> | Sets a title of the document. |
<body> | Specifies the body of the document. |
<h1> to <h6> | Defines HTML headings. |
<p> | Defines a paragraph. |
<br> | Specifies a line break. |
<hr> | Inserts a horizontal line or defines a thematic break. |
| <!-- ... --> | Defines a comment. |
Etiquetas de formato
Las etiquetas de formato se usan para el estilo visual y para enfatizar fragmentos de texto.
| Tag | Description |
|---|---|
<acronym> | Defines acronyms. Not supported in HTML5. The <abbr> tag is used instead. |
<abbr> | Defines abbreviation or acronym. |
<address> | Specifies contact information for the author/owner of a document/article. |
<b> | Displays text in a bold style. |
<bdi> | Isolates a text fragment from its surrounding for the purposes of bidirectional text formatting. New element in HTML5. |
<bdo> | Overrides the current text direction. |
<big> | Displays text in a bigger size. Not supported in HTML5. CSS styles are used instead. |
<blockquote> | Defines a long citation. |
<center> | Displays text as centered. Not supported in HTML5. CSS styles are used instead. |
<cite> | Describes a reference (title, author, or the URL) to a cited creative work. |
<code> | Defines a fragment of computer code. |
<del> | Specifies deleted text. |
<dfn> | Sets a definition of a term in italic. |
<em> | Specifies an emphasized text. |
<font> | Sets font, color and size of the text. Not supported in HTML5. CSS styles are used instead. |
<i> | Displays text in italic. |
<ins> | Defines a text inserted into a document. |
<kbd> | Specifies keyboard input. |
<mark> | Contains a marked/highlighted text. New element in HTML5. |
<meter> | Defines a scalar measurement within a known range (a gauge). |
<pre> | Defines a preformatted text. |
<progress> | Indicates the completion progress of a task (progress bar). New element in HTML5. |
<q> | Defines a short quotation. |
<rp> | Contains an alternative text to be shown in browsers that do not support the <ruby> text. New element in HTML5. |
<rt> | Defines the pronunciation of character presented in a ruby annotations (for East Asian typography). New element in HTML5. |
<ruby> | Represents a ruby annotation (for East Asian typography). New element in HTML5. |
<s> | Displays a text that is no longer correct in strikethrough style. |
<samp> | Sets sample output from a computer program. |
<small> | Displays text in a smaller size. |
<strike> | Defines text in strikethrough style. Not supported in HTML5. The <del> or <s> tags are used instead. |
<strong> | Defines strongly emphasized text. |
<sub> | Defines subscripted text. |
<sup> | Defines superscripted text. |
<template> | Defines a template. New element in HTML5. |
<time> | Defines a date/time. New element in HTML5. |
<tt> | Displays text in a teletype style. Not supported in HTML5. CSS styles are used instead. |
<u> | Displays text stylistically different from normal text as underlined. |
<var> | Defines a variable. |
<wbr> | Defines a possible line-break. New element in HTML5. |
Etiquetas de formulario
| Tag | Description |
|---|---|
<form> | Specifies an HTML form for user input. |
<input> | Defines an input control. |
<textarea> | Sets a multi-line text input control (text area). |
<button> | Defines a clickable button inside an HTML form. |
<select> | Defines a selection list within a form. |
<optgroup> | Groups related options in a selection list. |
<option> | Defines an option in a selection list. |
<label> | Sets a label for an <input> element. |
<fieldset> | Groups related elements in a form. |
<legend> | Sets a title for an <fieldset> element. |
<datalist> | Contains a set of pre-defined options for an <input> element. New element in HTML5. |
<keygen> | Generates a public-private key pair for encoding/decoding data of the form. Deprecated and removed from modern standards. |
<output> | Defines the result of a calculation. New element in HTML5. |
Etiquetas de marcos
| Tag | Description |
|---|---|
<frame> | Specifies a single frame within a frameset. Not supported in HTML5. |
<frameset> | Specifies a set of frames. Not supported in HTML5. |
<noframes> | Contains alternate content to be displayed in browsers that do not support frames. Not supported in HTML5. |
<iframe> | Displays a URL in an inline frame. |
Etiquetas de imagen
| Tag | Description |
|---|---|
<img> | Specifies an image. |
<map> | Specifies a client-side image-map. |
<area> | Defines an interactive area inside an image-map. |
<canvas> | Defines an area in the document, where one can draw graphics on the fly via scripting (usually JavaScript). New element in HTML5. |
<figcaption> | Defines a title of a <figure> element. New element in HTML5. |
<figure> | Defines a self-contained content. New element in HTML5. |
<picture> | Container for multiple image resources specified within <source> elements. New element in HTML5. |
<svg> | Container for SVG graphics. New element in HTML5. |
Etiquetas de audio/video
| Tag | Description |
|---|---|
<audio> | Defines audio content. New element in HTML5. |
<source> | Contains alternative media resources for the media elements like <video> or <audio>. New element in HTML5. |
<track> | Contains text track for the media elements (<video> and <audio>). New element in HTML5. |
<video> | Defines video content. New element in HTML5. |
Etiquetas de enlace
| Tag | Description |
|---|---|
<a> | Defines a hyperlink. |
<link> | Sets the relationship between the current document and an external resource (usually external CSS stylesheet). |
<nav> | Defines navigation links. New element in HTML5. |
Etiquetas de lista
| Tag | Description |
|---|---|
<ul> | Defines an unordered list. |
<ol> | Defines an ordered list. |
<li> | Defines a list item. |
<dir> | Defines a directory list. Not supported in HTML5. |
<dl> | Defines a definition list. |
<dt> | Defines a term/item in a definition list. |
<dd> | Defines a definition for a term in a definition list. |
<menu> | Defines a list of commands/context menu. |
<menuitem> | Defines an item in context menu. New element in HTML5. |
Etiquetas de tabla
| Tag | Description |
|---|---|
<table> | Defines a table. |
<caption> | Defines a title of the table. |
<th> | Defines a header cell in a table. |
<tr> | Defines a row of cells in a table. |
<td> | Defines a cell in a table. |
<thead> | Groups a set of rows that describes the column labels of a table. |
<tbody> | Groups a set of rows defining the main body of the table data. |
<tfoot> | Defines a footer of a table. |
<col> | Defines values for one or more columns in a <colgroup> element. |
<colgroup> | Specifies a group of one or more columns in a table for formatting. |
Etiquetas de estilo y semánticas
| Tag | Description |
|---|---|
<style> | Contains style information (commonly CSS). |
<div> | Defines a division or a section in a document. |
<span> | Defines an inline styleless section in a document. |
<header> | Defines a header or a section of introductory content. New element in HTML5. |
<footer> | Defines the footer of a document or a section. New element in HTML5. |
<main> | Specifies the main content of a document. New element in HTML5. |
<section> | Defines a section of a document (header, footer etc.). New element in HTML5. |
<article> | Defines an article. New element in HTML5. |
<aside> | Defines a section, which contains information loosely related to the page content. New element in HTML5. |
<details> | Contains additional details that the user can view or hide. New element in HTML5. |
<dialog> | Defines a dialog box or window. New element in HTML5. |
<data> | Defines a machine-readable translation of the content. New element in HTML5. |
<summary> | Defines a summary for the <details> element. New element in HTML5. |
Etiquetas de metadatos
| Tag | Description |
|---|---|
<head> | Contains technical information about the document, which is not displayed to the user. |
<meta> | Contains metadata of the document. |
<base> | Defines the base (absolute) URL for all linked objects on a page. |
<basefont> | Specifies the base font, size and color for a text. Not supported in HTML5. |
Etiquetas de scripting y programación
| Tag | Description |
|---|---|
<script> | Contains script in the document for client-side processing. |
<noscript> | Defines an alternate content to be displayed in browsers that do not support scripts. |
<applet> | Specifies an embedded applet. Not supported in HTML5. |
<embed> | Contains external application, typically multimedia content like audio or video embedded in an HTML document. |
<object> | Defines an embedded object (video, Flash, applets, images, etc.). |
<param> | Defines a parameter for an object or applet element. |
Practice
Which of the following tags are considered as 'Container' tags in HTML?