Guía de sintaxis Markdown
Sintaxis esencial para formatear documentos
Resumen
Markdown es un lenguaje de marcado ligero para añadir formato a documentos de texto plano. Creado por John Gruber en 2004, es uno de los más usados del mundo.
Markdown no es como un editor WYSIWYG (p. ej. Word), donde formateas con botones y ves los cambios al instante. En Markdown añades sintaxis al texto para indicar qué debe verse distinto.
Encabezados
Para crear un encabezado, pon almohadillas (#) delante. El número de # corresponde al nivel (### = nivel 3).
Heading level 1
Heading level 2
Heading level 3
Heading level 4
Heading level 5
Heading level 6
Párrafos
Para crear párrafos, separa líneas de texto con una línea en blanco.
It lets me write easily.
<p>It lets me write easily.</p>
I really like using Markdown.
It lets me write easily.
Saltos de línea
Para un salto de línea, termina la línea con dos o más espacios y pulsa Intro.
And this is the second line.
And this is the second line.</p>
This is the first line.
And this is the second line.
Énfasis
Puedes dar énfasis en negrita o cursiva.
Negrita
Para negrita, usa dos asteriscos (**) o guiones bajos (__) antes y después.
I just love bold text.
I just love bold text.
Cursiva
Para cursiva, usa un asterisco (*) o guión bajo (_) antes y después.
The cat meows.
The cat meows.
Negrita y cursiva
Para ambos, usa tres asteriscos (***) o guiones bajos (___) antes y después.
This text is really important.
This text is really important.
Citas
Para una cita, pon > delante del párrafo.
Dorothy followed her through many of the beautiful rooms in her castle.
Citas anidadas
Las citas pueden anidarse. Usa >> delante del párrafo anidado.
>
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
Dorothy followed her through many of the beautiful rooms in her castle.
The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
Listas
Puedes organizar elementos en listas ordenadas o sin orden.
Listas ordenadas
Usa números seguidos de punto (1. 2. 3.). El orden numérico no importa, pero empieza por 1.
2. Second item
3. Third item
4. Fourth item
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
- First item
- Second item
- Third item
- Fourth item
Listas sin orden
Usa guiones (-), asteriscos (*) o más (+) delante de cada elemento.
- Second item
- Third item
- Fourth item
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
- First item
- Second item
- Third item
- Fourth item
Código
Para marcar código, enciérralo en comillas invertidas (`).
At the command prompt, type nano.
Bloques de código
Indenta con 4 espacios o 1 tabulación, o usa triple comilla (```) antes y después del bloque.
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
```
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}Líneas horizontales
Usa tres o más asteriscos (***), guiones (---) o guiones bajos (___) en una línea sola.
Enlaces
Enlaces: [texto](URL). Ej.: [Duck Duck Go](https://duckduckgo.com).
My favorite search engine is Duck Duck Go.
Añadir títulos
Puedes añadir un título al enlace entre comillas tras la URL. Aparece como tooltip al pasar el ratón.
My favorite search engine is Duck Duck Go.
Imágenes
Imagen: . Opcionalmente, un título entre comillas tras la URL.

Escapar caracteres
Para mostrar un carácter especial literal, pon una barra invertida (\) delante.
* Without the backslash, this would be a bullet in an unordered list.
Caracteres que puedes escapar
Puedes escapar estos caracteres con \:
| \ | backslash |
| ` | backtick |
| * | asterisk |
| _ | underscore |
| { } | curly braces |
| [ ] | brackets |
| ( ) | parentheses |
| # | pound sign |
| + | plus sign |
| - | minus sign (hyphen) |
| . | dot |
| ! | exclamation mark |
| | | pipe |
Tablas
Usa tres o más guiones (---) para el encabezado de cada columna y tuberías (|) para separar columnas.
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
| Syntax | Description |
|---|---|
| Header | Title |
| Paragraph | Text |
Alineación
Alinea a izquierda, derecha o centro añadiendo dos puntos (:) a la izquierda, derecha o ambos lados de los guiones del encabezado.
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
| Izquierda | Centro | Derecha |
|---|---|---|
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |