Center Markdown

In this tutorial we are going to talk about the center markdown, we will see how to center elements using markdown, let’s first have a look at the brief introduction to markdown below.

What is Markdown?

Markdown is nothing but a syntax that makes writing easier and more understandable or readable. In markdown, we don’t need to add tags for styling text purposes like HTML.

The aim to use Markdown is to make text plain, a plain text that can be readable on the web for emails and documents without tags.   

We can’t add extra features in a text like colors shades highlights etc with markdown we can just change the font, and size of the text.

Now if we talk about the usage of markdown syntax so it’s quite simple, there are a lot of open source markdown editors you can download and write the markdown format in it for free.

Some of the famous markdown editors are:

you can use any one of the above editors. Where you can write your text and you will feel like you are working on the notepad or MSword. 

Now let’s see the markdown syntax, Markdown is very easy to write syntax see the few examples below.

Example 1

If you want to write a phrase in bold so you can just write it like *hello* or **hello** just add (asterisks) at the start and end of that word or sentence and then that will be converted into the bold format.

Example 2

Similarly, if you want to change the format to italic to add underscores at the start and end of that particular word or sentence like _hello_ and tadaaa that word will be changed into an italic format.

Example 3

If you want to add headings in different sizes so you can use #, if you add a single # so the heading will be displayed in large format. if you use double ## so it will show the heading in a slight small format you can add one to 6 hashes(#) means six different sizes like below.

#Header one

## Header two

###Header three

####Header four

#####Header five

######Header six 

Hope you got the concept of markdown plain text formatting syntax, now let’s see how we can center an element in markdown.

So it’s a quite simple trick we can just use the property aligned to center an element as we use in HTML.

We have to take help from HTML because we can’t change positions of images or text elements using only markdown, unfortunately, markdown doesn’t contain this facility. As we mentioned above it works on plain text it can only change the font size and format of the text, not the position or colors.

Check out the example below.

<p align="center">
  <img width="352" height="250" src="picture.jpg" alt="Center Markdown">
</p>

In the above piece of code, we used an HTML paragraph <p> tag, and then inside the <p> tag, we used an image tag to move it to the center.

We used HTML tag you can use CSS as well.  

Similarly, we can center the text and also see the piece of code below.

<h1 align="center">Center Markdown</h1>

Conclusion

In today’s tutorial, we talked about Markdown we discussed a brief introduction, and then we saw a few examples of markdown syntax.

We also discussed how to center image or text in markdown we took help from HTML and used it as an example to center the text and image.

That’s all for today hope you like the tutorial.

If you have any queries regarding this article so feel free to contact us below. Thanks for reading.

Leave a Comment