English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Tutoriales básicos de HTML

Medios HTML

Manual de referencia HTML

HTML5 Tutoriales básicos

HTML5 API

HTML5 Medios

Formateo de texto HTML

En este capítulo aprenderemos a formatear texto en HTML, es decir, aplicar formatos a texto común

Formateo de texto HTML

<strong>Texto en negrita(oldtoolbag.com)</strong>
<br/><i>Texto cursiva,w3codebox tutorial básico</i>
<br/><code>Code se salida automáticamente</code>
<br/>Este es el elemento X<sub>índice</sub> y X<sup>subíndice</sup>
<br/>Fórmula química:<b>C<sub>7</sub>H<sub>7</sub>F<sub>2</sub>N</b>
Prueba para ver ‹/›

Etiquetas de formateo de HTML

HTML utiliza etiquetas <b>(Negrita) y <i>(Cursiva) para formatear el texto de salida, como:Bold or Italic

These HTML tags are called formatting tags (please see the complete tag reference manual at the bottom).

It is usually recommended to use the <strong> tag instead of the bold tag <b>, so it is recommended to use <strong> , <em> replaces the <i> tag.
However, the meanings of these tags are different:

<b> and <i> define bold or italic text.
The <b> and <i> tags are two different tags, the <b> tag represents bold, it is represented by the letter B, and the <b> tag can emphasize the bold effect of the font appearance. For example: <b>I am bold</b>
However, the <strong> tag is the place we want to emphasize, and these two tags have different meanings. For example: <strong>Emphasize font</strong>.

<strong> or <em> means that the text you want to present is important and should be highlighted. Today, all major browsers can render various font effects. However, future browsers may support better rendering effects.

Online example

Ordinary text formatting
This example demonstrates how to format ordinary text in an HTML file.

Preformatted text
This example demonstrates how to use the pre tag to control blank lines and spaces.

"Computer output" tags
This example demonstrates the display effects of different "computer output" tags.

Address
This example demonstrates how to write addresses in an HTML file.

Abbreviations and initials
This example demonstrates how HTML implements abbreviations or initials.

Text direction
This example demonstrates how HTML changes the direction of text.

Block quote
This example demonstrates how HTML implements quotes of different lengths.

Deleted text effect and inserted text effect
This example demonstrates how HTML marks deleted text and inserted text.

HTML text formatting tags

LabelDescription
<b>Define the bold text
<em>Define the emphasized text
<i>Define the italic text
<small>Define the small text
<strong>Define the emphasis
<sub>Define the subscript text
<sup>Define the superscript text
<ins>Define the inserted text
<del>Define the deleted text

HTML "computer output" tag

LabelDescription
<code>Define the computer code
<kbd>Define the keyboard code
<samp>Define the computer code sample
<var>Define the variable
<pre>Define the preformatted text

HTML citation, quote, and tag definition

LabelDescription
<abbr>Define the abbreviation
<address>Define the address
<bdo>Define the text direction
<blockquote>Definir citas largas
<q>Definir citas cortas
<cite>Definir referencia, citación
<dfn>Definir un proyecto de definición.