Definitive guide of Markdown and HTML: Improve the structure of your publications

avatar
(Edited)

The ultimate (1).png

diamantito_separador (2).png

Markdown and HTML Guide

diamantito_separador (2).png


Introduction
Text Size
Text Decoration and Colors
Align the content
Upload images per link
Paragraphs, separators, quotes and spoilers.
Create list of items and numbers and spoilers.
Creation of tables
Redirecting to a link and creating an index

diamantito_separador (2).png

Introduction

diamantito_separador (2).png

Good morning everyone! Today I bring you a guide about Markdown and HTML. Before going into detail about the possibilities that both offer to create publications, I want to clarify an important point: it is not recommended to mix HTML and Markdown excessively in the same section of the text. This can cause problems, such as misalignments or unexpected formatting that could affect the presentation of the content.

  • Markdown is a simple markup language designed to create documents that are easily readable and convertible to HTML, without the need to write complex code.

  • HTML is the standard used to structure web pages, allowing you to define the organization and format with tags and attributes.

diamantito_separador (2).png

Text Size

diamantito_separador (2).png

In both HTML and Markdown, we have an option to size the text up to six levels. In the case of Markdown, we place a # (hashtag) at the beginning of the line followed by a space and in HTML we have to use the < h(size)> < /h(size)> tag that closes the text.

Giant title

HTML: <h1> Giant title </h1>
Markdown: # Giant title

Very big title

HTML: <h2>Very big title</h2>
Markdown: ## Very big title

Big title

HTML: <h3>Big title</h3>
Markdown: ### Big title

Medium title

HTML: <h4> Medium titleo </h4>
Markdown: #### Medium title
Small title
HTML: <h5> Small title </h5>
Markdown: ##### Small title
Smaller title
HTML: Smaller title
Markdown: ###### Smaller title

diamantito_separador (2).png

Text decoration and colors

diamantito_separador (2).png

We also have several options to decorate our text and only one option to paint red, since Markdown does not support colors and in HTML you cannot apply styles to the tag either.

Bold
HTML: <strong>Bold</strong>
Markdown: **Bold**
Underlined
HTML: <u>Underlined</u>
Markdown: No support
Cross out
HTML: <s>Cross out</s>
Markdown: ~~Cross out~~
Italic
HTML: <em>Italic</em>
Markdown: *Italic*
Red
HTML: <div class="phishy">Red</div>
Markdown: No support

diamantito_separador (2).png

Align content

diamantito_separador (2).png

The platform offers us a single option to align the content of our post: left, center or right, using the following tags:

Code Example
<div class="pull-left"> Align to Left </div>
Align to Left
<center> Align to Center </center>
Align to Center
<div class="pull-right"> Align to Right </div>
Align to Right

Maybe the table doesn't show it so well, so here is a more practical example:


Left


Center


Right

We can also use Left and Right only, which is a widely used format for making posts in two languages:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et libero pretium, iaculis diam convallis, eleifend nulla. Sed dictum tincidunt sagittis. Duis maximus ultrices dolor, ut convallis elit viverra id.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et libero pretium, iaculis diam convallis, eleifend nulla. Sed dictum tincidunt sagittis. Duis maximus ultrices dolor, ut convallis elit viverra id.

diamantito_separador (2).png

Upload image by link

diamantito_separador (2).png

Using one image per link with Markdown Use one image per link with HTML

To upload an image in Markdown, you can use the following format:

![Texto descriptivo](link)

  • Descriptive text: Text that describes the image. It will appear if the image does not load correctly or if someone chooses to listen to the post with audio.
  • link: This is the URL or the address of the image you want to insert.

To upload an image in HTML, you can use the following format:

<img src="link" alt="Descriptive text">

  • src="link": The path or URL of the image you want to insert.
  • alt="Descriptive text": Text that describes the image. It will appear if the image does not load correctly or if someone chooses to listen to the post with audio.
$1 $1

diamantito_separador (2).png

Paragraphs, Dividers, Quotes and Spoilers

diamantito_separador (2).png

Paragraphs
HTML: <p>This is a paragraph in HTML.</p> Here is what follows
Result:

This is a paragraph in HTML

Here is what follows
Separators
HTML: <hr></hr> or <hr/>
Markdown: ---
Result:

Separators are quite useful for posts. However, it is more advisable to use personal separators like the ones I used. The most used one is this image:

NTy4GV6ooFRmaCXZ8UYgPhoud1kjiNX8QokLEZtbBKLuLWQ9yt7K3o4PG8fAHT8nqJdLrXhv1wkFmU7XSq8inKhsASTSSHQG7ThpFEita6PHBLFpqG32TMrcwsEjF6LTjhQk2KsCPiU9dcBJxD45RZSyzGW2okbroUKxgWNA.png

Quotes
HTML: <quote>This is a quote</blockquote>
Markdown: > This is a quote
Result:
This is a quote
Spoiler
HTML: <details> <summary>Spoiler Alert Title</summary> <p>Spoiler content</p> </details>
Markdown: >! [Spoiler Alert Title] Spoiler content
Result: Spoiler Alert Title

Spoiler content

diamantito_separador (2).png

Lists with items and with numbers.

diamantito_separador (2).png

Lists with items can be made with both Markdown and HTML, in HTML it is enough with two tags and in Markdown it is much easier to do it with a hyphen(-) and space.

Lista con items
HTML: <ul> <li> First item </li> <li> Second item </li> <li> Third item </li> </ul>
Markdown: - First item - Second item - Third item
Result:
  • First item
  • Second item
  • Third item

To make a list with numbers, in HTML you have to use two tags and in Markdown just the number with a .

List with numbers
HTML: <ol> <li> First item </li> <li> Second item </li> <li> Third item </li> </ol>
Markdown: 1. First item 2. Second item 3. Third item
Result:
  1. First item
  2. Second item
  3. Third item

diamantito_separador (2).png

Create tables

diamantito_separador (2).png

We come to perhaps the most complicated part to understand and explain. In case you have no experience manipulating HTML code, I strongly recommend that you use Markdown to create your tables because it is quite simple:

Glosario

  • |: It is used to separate columns.
  • ---: It is used as a separator between headers and data.

Code:

| Column 1 | Column 2 | Column 3 |
|-----------|------------|------------|
| Data 1    | Data 2    | Data 3    |
| Data 4    | Data 5    | Data 6    |

Result:
Column 1Column 2Column 3
Data 1Data 2Data 3
Data 4Data 5Data 6

If you like to complicate your life, here is the tutorial on how to make a table with HTML:

Glosario

  • <table>: Define the complete table.
  • <thead>: Defines the header of the table, where the column headings go.
  • <tr>: Defines a row of the table.
  • <th>: Defines column headers.
  • <tbody>: Defines the body of the table, where the data is located.
  • <td>: Define cells within the table.

Code:

<table>
   <thead>
     <tr>
      <th><h6>Title 1</h6></th>
      <th><h6>Title 2</h6></th>
      <th><h6>Title 3</h6></th>
     </tr>
   </thead>
   <tbody>
     <tr>
      <td>Data 1</td> 
      <td>Data 2</td>
      <td>Data 3</td>
     </tr>
     <tr>
      <td>Data 4</td>
      <td>Data 5</td>
      <td>Data 6</td>
     </tr>
   </tbody>
</table>

Result:

Title 1
Title 2
Title 3
Data 1 Data 2 Data 3
Data 4 Data 5 Data 6

These tables are fully customizable, having the opportunity to add rows and columns as much as you want. The tables is a function that I use very often to capture statistics that I compile.

diamantito_separador (2).png

Links and Index

diamantito_separador (2).png

Redirect to a link
HTML: <a href="https://risingstarutils.vexy.host/">Link text</a>
Markdown: [Link text](https://risingstarutils.vexy.host/)
Result: Link text
Create an index to redirect to a section of the post.
Create target: <div id="introduction"> Text </div>
It is necessary to place the `#` before the `id`, so that the link stays on the page and does not redirect out of it..
HTML: <a href="#introduction">Go to introduction</a>
Markdown: [Go to introduction](#introduction)
Result: Go to introduction

diamantito_separador (2).png

Here are some tricks I have learned while posting in this and other forums. Unfortunately, this forum's HTML has limitations, as it does not allow adding CSS styles, which makes it difficult to customize aspects such as text colors, table sizes and other visual details. However, with the right techniques, clear and functional presentations can be achieved.

We have reached the end of the detailed guide to Markdown and HTML. If in the future I forget some functionality or have something else to add, I will not hesitate to edit the post and add it. I have tried to create a format as clear and attractive as possible so that the information is easy to read and understand.

diamantito_separador (2).png


NTy4GV6ooFRmaCXZ8UYgPhoud1kjiNX8QokLEZtbBKLuLWQ9yt7K3o4PG8fAHT8nqJdLrXhurqwDcWRgu6U8ny2QR2LSBp5op43LvTmPfRfjQaw6ik2id4Dmh2ZMwtT5Wc7E7YDL4VuwJUY972EhR52ejENrdE3hRFsbHvog.png



0
0
0.000
7 comments
avatar

Excellent post!
I'll use this guide to improve my own post and I hope helps others users too.
Thanks for sharing :)

0
0
0.000
avatar

Ufff, es una excelente guía, me servirá para crear unas publicaciones más bonitas. Ese conocimiento de programación si se puede ver. Excelente 💫

0
0
0.000
avatar

great post, I need to learn how to use html with my posts, Im saving this one

0
0
0.000
avatar

Thank you for sharing this

0
0
0.000
avatar

This is excellent, thank you very much for sharing this. I'm reblogging, so I can come back to learn this in my free time.

0
0
0.000