155
votes
Accepted
Can I start a paragraph with "1."?
As documented in the CommonMark Spec, you can escape it with a backslash before the period.
1\. Example
See:
1. Example
- 57.6k
112
votes
Accepted
How to put tables in Stack Overflow?
As of November 2020, table Markdown is now supported on all Stack Exchange sites.
| Heading 1 | Heading 2 |
|---------------------|------------------|
| 12 | ...
- 19.8k
91
votes
Accepted
Should code be edited so that it is visible rather than being in one long line?
Yes, if you're improving the quality of the post, you should make the edit. Code on a single line is not very readable, so formatting it is an improvement. Make sure that when formatting the code you ...
- 56.9k
82
votes
How can I create a table in a post?
Tables have been added to Stack Exchange as of December 2020.
This is what you want:
|id|name |email|
|--| --- | --- |
|1 | Sta |sta@example.com|
|2 |Danny|dany@example.com|
|3 |Elle |elle@example.com|...
Community wiki
82
votes
Accepted
Did I not blockquote this correctly?
Your formatting was correct. You were quoting a article you linked, so the text should be formatted as such.
You handled correctly by rolling the edit back.
- 69.5k
79
votes
Accepted
How do I remove excess indentation on my code blocks?
For reasons previously unbeknownst to me, the same keyboard shortcut that you use to format unformatted code as Markdown code blocks (Ctrl+K) can also be used to reduce the indentation of code blocks ...
- 691k
75
votes
Accepted
Should we approve suggested edits that change ``` to four spaces code formatting or vice versa?
No. Edits like those should be rejected for not making a meaningful improvement or making the post easier to read.
Edits that only change formatting are appropriate in very narrow circumstances, such ...
- 43.9k
73
votes
Could Stack Overflow support GitHub flavored markdown?
Another benefit that I'm surprised hasn't been given more emphasis is the ability to specify the language
```php
class PleaseAdd {
public function tripleBackTicks() {
echo "please";
}...
- 23.9k
64
votes
Accepted
Should we disapprove of uploading images of tables when asking a question?
The rule of thumb should always be to favor whatever makes a question easiest to read and to answer. Even before the introduction of table markdown, images of tables were discouraged, for a number of ...
- 292k
58
votes
Accepted
How to format a link within a code block
Sure, here you go:
I tried to edit one of my posts by adding a comment within a code block which contains a link. Like so:
.example {
text-decoration: underline;
-moz-text-decoration-...
- 44.3k
56
votes
Accepted
Should I fix the formatting if it changes the meaning?
Stack Overflow has always done this (C# type specifiers in < > being interpreted as HTML tags outside of a code block), and I've always fixed them without hesitation.
It's not about "don't ...
- 71.6k
55
votes
Please block posts containing unsupported HTML
There are basically three ways to perform rich text markup of posts on the web: HTML, BBCode and Markdown, with or without a WYSI(NQ)WYG GUI. For developers, who work with text all day, using either ...
- 145k
54
votes
Accepted
Why does this markdown not render as a list?
Add an extra blank line before your list.
You have your list and the previous line like this:
Worth noting:
- My Workspace folder is `C:\Users\Jon\Aukitekt`
- My project folder is `C:\Users\Jon\...
- 769
51
votes
Accepted
Is there a way to put code blocks in block quotes?
The blockquote Markdown syntax allows for an optional space after >, so in order to have code formatted inside a blockquote, you will need a > followed by five spaces instead of the usual four, ...
- 53.5k
48
votes
Accepted
Why do backticks not work inside HTML lists?
This is correct Markdown behavior. As the syntax rules state:
Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style *emphasis* ...
- 35.1k
46
votes
Strikethrough Markdown Not Working
I've used strikethrough often and quite successfully. I think you might not be using the correct syntax. I use <s>text</s>.
If you can't see the struck out text above, then it might be a ...
- 3,808
45
votes
Accepted
Unable to type * asterisk in BulletedList <ul> while answering and asking quesion
Use a Backslash Escape to escape the * with a \ as follows:
- \* aa
- bb
Output:
* aa
bb
Source Markdown: Syntax
Backslash Escapes
Markdown allows you to use backslash escapes to generate ...
- 7,633
45
votes
Should I fix the formatting if it changes the meaning?
Escape the first <
Stream\<Integer>
Or use backticks
`Stream<Integer>`
You're not changing the meaning because
It's already there, but seen incorrectly as HTML
It's in the code block ...
MachavityMod
- 30.6k
43
votes
Should code be edited so that it is visible rather than being in one long line?
In general, my answer would be "yes, but...", but in this case it would be "probably not." It depends on the purpose.
The probably not: You used a very specific example from r ...
- 16.2k
41
votes
Cannot figure why am getting "Your post appears to contain code that is not properly formatted"
Include pictures in post may cause this problem.
If we insert picture using Image button in toolbar, or use shortcut key Ctrl+G, a script like below will be inserted to out post:
[![enter image ...
- 3,483
41
votes
Should the system override my numbering?
Defeated! (Well, somewhat. See EDIT 2 below.)
First
Second
Markdown:
<ol start="0">
<li>First</li>
<li>Second</li>
</ol>
Sure, you probably aren't going to take ...
- 104k
40
votes
Allow (some) Markdown in question titles
It's very important (IMO) to keep the front page clean and elegant.
I won't like it if I see something like:
Think about badly formatted titles, that we suffer from it even without allowing ...
- 93.4k
39
votes
Accepted
Support CommonMark fenced code blocks
Code fences are now implemented. See Implement ```-style (fenced) Markdown code blocks on MSE for all the details.
- 49.7k
39
votes
Accepted
How do I format my data as a table with doubled line separators in my posts?
Those lines are Unicode box-drawing characters. You can easily make such "text art" tables yourself just by copy-pasting the characters from an existing table, or e.g. from the linked Wikipedia page.
...
- 49k
35
votes
Accepted
Why is the default for inserting an image like this [![enter image description here][1]][1]
[![enter image description here][1]][1] makes the image a link to itself. This makes it easy to simply click on it to open the image itself (useful for large images that appear small in the post). I ...
- 4,628
31
votes
Can I start a paragraph with "1."?
I don't know of any way to escape it, but you can easily trick the parser:
1. Do you want this?
2.<!----> Here's how.
3.<!> You can also use invalid HTML.
4.<z> There are a ...
- 5,923
30
votes
Is there a way to put code blocks in block quotes?
Apparently this also works:
> Some code:
>
> ```lang-js
> const a = 0
> ```
Demo:
Some code:
const a = 0
Useful because the accepted answer doesn't work on Github or on my ...
- 14.2k
30
votes
Should we disapprove of uploading images of tables when asking a question?
Since the introduction of the table markdown should people still be using images of tables instead of the markdown?
No. Really, no one should have ever been using images of tables. Creating ASCII ...
Cody GrayMod
- 237k
29
votes
Should we approve suggested edits that change ``` to four spaces code formatting or vice versa?
No. These types of edits should be rejected, especially now that this type of formatting actually results in proper code formatting, and not half-broken formatting.
These types of edits make ...
- 26.6k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
markdown × 366support × 138
bug × 124
markdown-rendering × 80
feature-request × 77
code-formatting × 61
discussion × 54
hyperlinks × 35
status-completed × 26
editor × 23
comments × 21
documentation × 18
formatting × 16
images × 12
status-declined × 11
status-bydesign × 11
syntax-highlighting × 11
tables × 11
edits × 10
design × 10
quality-filter × 9
stack-snippets × 7
help-center × 6
editing-help × 6
stack-overflow-for-teams × 5