3

I'm trying to build my personal blog with Hexo, which uses Markdown to write blog. When writing my About page, I want to use Tab to make the alignment looks better, I want the alignment to be like this:

enter image description here

Without tabs, the alignment looks like this:

enter image description here

Here's what I tried:

  • Use   or  , but to align the text, I have to repeat the character a lot of times, and the number of character used have to be calculated precisely
  • Use non-breaking spaces by typing option + space on my Mac, but it doesn't seems to help, there was no indent at all
  • Use HTML to write table, it could align the text, but the text have dark background, which looks not so good on the blog

I wonder is there any way to create the previously mentioned text alignment in Markdown or use HTML? I would be appreciated if you could kindly help.

Frost-Lee
  • 420
  • 1
  • 5
  • 20

1 Answers1

1

Finally figured it out, thanks Xinke Wu and this issue.

{% raw %}
<div style="width:250px; height:auto; float:left; display:inline"><b>Birthday</b>:</div> 
<div>April 30, 1998</div>
{% endraw %}

The {% raw %} and {% endraw %} tag would make it possible to insert a piece of HTML in a Markdown file in Hexo.

Frost-Lee
  • 420
  • 1
  • 5
  • 20