0

It's possible write text-align right in Markdown files?

For example write utf8 in Markdown files.

JJJ
  • 32,902
  • 20
  • 89
  • 102
  • 2
    `utf-8` has nothing to do with text-alignment. Are you asking about Unicode right-to-left text direction? If so, that's also not the same thing as text-alignment either. – Dai Sep 01 '19 at 11:31

1 Answers1

1

By "md file" I assume you're referring to Markdown.

By "text-align: right" you could be referring to either the right-alignment of left-to-right text or referring to right-to-left writing order - which are orthogonal concerns.

  • right-alignment of left-to-right writing:

    • Simply set style="text-align: right;" on any parent block-level elements (e.g. <div>, <p>, etc) or set a CSS rule (Your Markdown implementation should support inline style="" attributes, as well as <style> elements - check your implementation's documentation)
  • right-to-left writing:

    • This is controlled by putting a Unicode Right-to-left control character in your text. Provided you save the file in a Unicode encoding (e.g. utf-8, utf-16, etc) (and assuming your Markdown implementation doesn't remove the character) then compliant browsers will render the text in right-to-left order. This detail is fully independent of Markdown and works fine in other file formats too, including plaintext (e.g. in Windows Notepad), word-processors, and plain ol' HTML.
Dai
  • 141,631
  • 28
  • 261
  • 374