Markdown
One of the lightweight markup languages. It adds formatting to plain text with a simple notation and can be converted to HTML.
Markdown is a lightweight markup language that lets you add formatting such as headings, lists, links, and code blocks to plain text with a simple notation. It was released by John Gruber in 2004 and was created under the design philosophy of being "easy to write, easy to read, and easy to convert to HTML." While the syntax was being worked out, Aaron Swartz served as a sounding board, and atx, the notation Swartz created in 2002, is the basis for the way headings are written by lining up # characters. The name is a word formed as a counterpart to "markup" in HTML (HyperText Markup Language).
The basic syntax of Markdown is simple. You write headings with #, lists with any of -, *, or +, links with [テキスト](URL) ("text"), inline code with `コード` ("code"), and code blocks with ```. This conciseness is its greatest strength, and it lets you create documents overwhelmingly faster than writing HTML tags directly. Another characteristic is that several ways of writing are provided for the same formatting. Headings can be expressed not only in the atx style, which lines up 1 to 6 # characters, but also in the setext style, which fills the next line with = or - like an underline. For bullet points, too, the result is the same whichever of the 3 symbols you choose. In other words, because there are multiple ways to get the same appearance, the character count of the source varies with the writer's habits.
It is widely adopted in tools for developers, such as GitHub READMEs, technical blogs, documentation sites (MkDocs, Docusaurus, VitePress), chat tools (Slack, Discord), and note apps (Notion, Obsidian). As standardized specifications, CommonMark and GitHub Flavored Markdown (GFM) are the mainstream. GFM is defined as a strict superset of CommonMark: the body of the specification follows CommonMark as it is, and it defines 5 extensions, namely the addition of tables, strikethrough, autolinks, and task lists, plus tagfilter, which disables dangerous raw HTML tags. A document written in CommonMark passes as it is in GFM, but the reverse does not hold, and keeping this asymmetry in mind makes it easier to predict which parts will break when you switch dialects.
The advantage of Markdown is that it is readable enough even as plain text and can be edited without a special editor. It also works well with version control in Git, and checking diffs is easy. On the other hand, support for complex formatting such as tables, footnotes, and math varies by dialect, and compatibility problems can arise. Also, because you can write HTML directly inside Markdown, layouts that Markdown alone cannot fully express are also possible. However, the original specification has conditions: block-level elements such as <div> and <table> must be separated by blank lines before and after, and Markdown notation is not processed inside them. This is why, when you use an HTML table, writing **太字** ("bold") in a cell does not make it bold and the symbols are displayed as they are. On the other hand, inline elements such as <span> can be used even in the middle of a line, and the Markdown inside them is also processed.
A common misconception is that Markdown is a single specification, but in reality there are many dialects (flavors). There are the original Markdown, CommonMark, GFM, MultiMarkdown, Pandoc Markdown, and others, and each has different extended syntax. When using it in a project, it is important to make clear which specification you conform to.
From a character counting perspective, Markdown's notation characters (#, *, [], (), and so on) are not rendered on display, so a difference arises between the character count of the source and the displayed character count. For example, **太字** ("bold") is 6 characters in the source, but on display it is the 2 characters "太字". The difference is largest for links and images. [テキスト](https://example.com/page) ("text") is 32 characters in the source, while only the 4 characters "テキスト" are displayed, so the length of the URL becomes the difference as it is. The image  ("alt text") uses 38 characters, yet 0 characters are displayed as body text. When you want to show a notation character itself as a character, you escape it by placing \ immediately before it. \* is 2 characters in the source, but it is displayed as the single character "*". The symbols subject to escaping range widely: \, the backquote, *, _, the various brackets, #, +, -, ., and !. Conversely, there are also characters that do not appear on display but must not be removed. There is a notation in which placing 2 half-width spaces at the end of a line creates a line break within a paragraph, and if the text passes through an editor that automatically removes trailing whitespace or a trim process, the line break itself is lost along with these 2 characters. Before deciding whether to include whitespace in the count, it is safe to keep in mind that whitespace that disappears can change the display. Which character count to use as the standard is determined by what the destination counts. There are situations where judging by the appearance after display is natural, but if the input field's limit or the validation on the API side works on the source string, the character count on the source side, including the notation characters, is what matters. When you want to check whether a draft fits within the limit, first confirm whether what is being counted is the source or the converted body text.