Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add empty spaces into MD markdown readme on GitHub?

I'm struggling to add empty spaces before the string starts to make my GitHub README.md looks something like this:

enter image description here

Right now it looks like this:

enter image description here

I tried adding <br /> tag to fix the new string start, now it works, but I don't understand how to add spaces before the string starts without changing everything to &nbsp;. Maybe there's a more elegant way to format it?

like image 426
Aerodynamika Avatar asked Jun 28 '17 18:06

Aerodynamika


People also ask

How do you add a blank space in Markdown?

Blank Lines To add a single extra line after a paragraph, add two extra spaces at the end of the text. To add an extra line of space between paragraphs, add the HTML &nbsp; code, followed by two extra spaces (e.g. &nbsp.. , replacing the periods with spaces).

What is &nbsp in Markdown?

Another option, if your Markdown processor supports HTML, is to use the HTML entity for non-breaking space ( &nbsp; ).

How do I add a new line to a readme Md file?

(where _ is a blank space). Or, you can add explicit <br /> tags.

How do I display all spaces in Markdown?

You can use <pre> to display all spaces & blanks you have typed. E.g.: Show activity on this post. Markdown really changes everything to html and html collapses spaces so you really can't do anything about it.

How to add blank lines to Markdown content?

There are multiple ways to add blank lines to markdown content. Since Markdown is a text-to-HTML tool and if the parser supports HTML output, You can add HTML tags to it. uses to break new lines in html.

What is Markdown markup?

Markdown is a lightweight markup language with plain text formatting syntax. It is designed so that it can be converted to HTML and many other formats using a tool by the same name. eg. If you want to add 10 spaces contiguously then you should use space space space space space

What is the syntax used in README MD files?

The syntax used in README.md files is called Markdown. Markdown is a markup language for creating nicely formatted text using a plain-text editor. To learn about this syntax, please read my Readme Markdown Cheat Sheet. It’s a quick introduction to the simple Markdown syntax, with links to other topics like:


1 Answers

You can use <pre> to display all spaces & blanks you have typed. E.g.:

<pre> hello, this is    just an     example .... </pre> 
like image 178
terry.qiao Avatar answered Oct 21 '22 02:10

terry.qiao