653

Notes:

  • Answers will occasionally be moved to the Sandbox archive when there are too many of them. When using them to report bugs, keep an eye on the post.

  • You may also want to take a look at the Stack Exchange's Sandbox chat room

  • This site, Meta Stack Exchange, is usually used as a "test bed" for pending changes happening to the way text is rendered on all network sites. Changes to text rendering that are going to be rolled out to the network are usually deployed here first to test them out and fix any potential glitches. Currently, there are no such changes pending, but if there were, keep in mind that text posted here may render differently from the other sites until the changes roll out to them as well.

As per Jeff's suggestion in this comment:

You can use this question as a formatting sandbox. You can:

  • edit this question itself (Community Wiki questions such as this one require only 100 reputation to edit instead of 2,000)
  • post answers to this question (This question might be protected, requiring earning 10 reputation on this site to answer)
  • post comments to this question or its answers
  • test suspected bugs with the editor or the rendering
  • post ponies (only when mods are asleep)

Beware that since the changes to syntax highlighting in December 2010, and the inline hints added in March 2011, no syntax highlighting is applied unless the question's tags or an inline hint enable it. So, to test highlighting here in the sandbox:

  1. As of January 8, 2019, you can use GitHub-flavor fenced code blocks in your posts, specifying the language after the opening fence:

    ```html While not hinted otherwise: <html></html> source <b>goes</b> "here". ``` 
    ```js var a = 3; while (not (a > 0)) { alert("JavaScript code <b>goes</b> here."); } ``` 
  2. Or:

    • Create code blocks in any way (using the fence notation above, the four-space indent form, or using HTML <pre><code> tags).

    • Save your post!

    • Use your browser's developer tools to edit the resulting HTML. To open developer tools, press F12, or ⌥⌘ I on Mac.

    • Find the <pre> element and add the attribute class="prettyprint", or change it into one of the valid syntax hints linked above, like class="lang-vb prettyprint".

    • Run the following in the location bar: javascript:prettyPrint(); or prettyPrint() in the console.

Answers that are considered annoying or obnoxious, or that cause breakage for users, will be deleted. This is codified as a policy as of March 29, 2018.

20
  • <```>test Commented Oct 30, 2023 at 1:26
  • @TheEmptyStringPhotographer stop trolling!!! Commented Nov 10, 2023 at 14:54
  • @ShadowWizardIsSadAndAngry wait, how did you ping me? Commented Nov 10, 2023 at 15:09
  • @TheEmpty see here. (TL;DR: anyone who edited can be pinged) Commented Nov 10, 2023 at 16:44
  • <del>del</del> <strike>strike</strike> ---three sticks--- Commented Jul 17, 2024 at 13:13
  • 2
    ~~~maybe this~~~ hmm, does not work. Commented Jul 17, 2024 at 13:14
  • &gt is > and &lt is < Commented Jul 18, 2024 at 4:02
  • This comment contains a hover title Commented Aug 20, 2024 at 17:44
  • Maybe it's due to whitespace? 22 ALLOW 191.1.2.3 22 DENY Anywhere Commented Sep 28, 2024 at 10:21
  • dev on prod go brrrrrrr Commented Nov 6, 2024 at 18:42
  • This may be (vaguely) related to fractional coloring [(en.wikipedia.org/wiki/Fractional_coloring),(https://…? Commented Nov 16, 2024 at 21:23
  • @PetəíŕdtheWizard test ping Commented Nov 21, 2024 at 7:05
  • Here to use this page as a dedicated sandbox Commented Dec 21, 2024 at 20:51
  • Use the groupingBy method. Commented Feb 14 at 14:44
  • padding padding Commented Mar 4 at 1:21

322 Answers 322

1 2 3
4
5
11
2

using table to present images horizontally

enter image description here enter image description here enter image description here

caption as second row

enter image description here enter image description here enter image description here
90-tooth finishing 84-tooth laminate 50-tooth combo

caption as headers

90-tooth finishing 84-tooth laminate 50-tooth combo
enter image description here enter image description here enter image description here

caption as text

enter image description here
90-tooth-finishing
enter image description here
84-tooth laminate
enter image description here
50-tooth combo

👍

2

Zarya (Russian: Заря́, lit. 'Dawn'[b]), also known as the Functional Cargo Block or FGB (from the Russian: "Функционально-грузовой блок", lit. 'Funktsionalno-gruzovoy blok' or ФГБ), is the first module of the International Space Station to have been launched.[2] The FGB provided ...


Comment: [ -+- ]

Zarya (Russian: Заря́, lit. 'Dawn'[b]), also known as the Functional Cargo Block or FGB (from the Russian: "Функционально-грузовой блок", lit. 'Funktsionalno-gruzovoy blok' or ФГБ), is the first module of the International Space Station to have been launched.[2] The FGB provided ...


Comment: &#91; [ -+- &#93; ]

Zarya (Russian: Заря́, lit. 'Dawn'[b]), also known as the Functional Cargo Block or FGB (from the Russian: "Функционально-грузовой блок", lit. 'Funktsionalno-gruzovoy blok' or ФГБ), is the first module of the International Space Station to have been launched.[2] The FGB provided ...


We are here: https://meta.stackexchange.com/a/364246/282094

Test Answer: Does Cyrillic kill proper display of hyperlinks in comments, but not in posts?

https://en.wikipedia.org/wiki/Zarya

Zarya (Russian: Заря́, lit. 'Dawn'[b]), also known as the Functional Cargo Block or FGB (from the Russian: "Функционально-грузовой блок", lit. 'Funktsionalno-gruzovoy blok' or ФГБ), is the first module of the International Space Station to have been launched.[2] The FGB provided electrical power, storage, propulsion, and guidance to the ISS during the initial stage of assembly. With the launch and assembly in orbit of other modules with more specialized functionality, Zarya is now[when?] primarily used for storage, both inside the pressurized section and in the externally mounted fuel tanks.

3
2

Testing if powershell does syntax highlight when specified:

. "$PSScriptRoot\third.ps1" #get $Current  = second.ps1 #get $Caller   = first.ps1  #get $Original = first.ps1  $wc = new-object System.Net.WebClient $wc.Headers.Add("user-agent", "PowerShell Script") $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials  $action = [System.IO.Path]::GetFileNameWithoutExtension($myInvocation.MyCommand.Name) . "$PSScriptRoot\third.ps1" #get $Current  = second.ps1 #get $Caller   = first.ps1  #get $Original = first.ps1  $wc = new-object System.Net.WebClient $wc.Headers.Add("user-agent", "PowerShell Script") $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials  $action = [System.IO.Path]::GetFileNameWithoutExtension($myInvocation.MyCommand.Name)  
. "$PSScriptRoot\third.ps1" #get $Current  = second.ps1 #get $Caller   = first.ps1  #get $Original = first.ps1  $wc = new-object System.Net.WebClient $wc.Headers.Add("user-agent", "PowerShell Script") $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials  $action = [System.IO.Path]::GetFileNameWithoutExtension($myInvocation.MyCommand.Name) . "$PSScriptRoot\third.ps1" #get $Current  = second.ps1 #get $Caller   = first.ps1  #get $Original = first.ps1  $wc = new-object System.Net.WebClient $wc.Headers.Add("user-agent", "PowerShell Script") $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials  $action = [System.IO.Path]::GetFileNameWithoutExtension($myInvocation.MyCommand.Name)  
Get-Module -Name "VMWave.*" | ForEach-Object { Import-Module $_; Write-Host "Imported Module $_"} 
2

Testing a table not preceded by an empty line: | | | | |---|---|---| |Bandwidth |XOUT, YOUT No external filter| 1600 Hz| |Bandwidth |ZOUT No external filter |550 Hz| |RFILT Tolerance| |32 ± 15% kΩ| |Sensor Resonant Frequency| |5.5 kHz|

❌ Oops! Does not work.


Testing a table preceded by an empty line:

Bandwidth XOUT, YOUT No external filter 1600 Hz
Bandwidth ZOUT No external filter 550 Hz
RFILT Tolerance 32 ± 15% kΩ
Sensor Resonant Frequency 5.5 kHz

✅ Works just fine.

2

This is a near duplicate to another answer of mine here. It appears at some point in the very recent past id attributes are no longer being automatically created for headings. This is a test to A) verify that, and B) see if it's still possible to use explicit id attributes on <hN> HTML elements. It also may test having more than one identical id attribute in the same page, which, if nothing is done by SE, is something that devolves onto the browser's behavior. Unfortunately, it's not possible to test this with just a revision of my prior answer, because id attributes are stripped when revisions are shown in the post history.

This heading was added to test if the IDs assigned to headings change

It looks like H4, H5, and H6 elements were added to the CSS. This is to test to see if they are live on the site for user contributions.

Using Markdown:

An H1 (Markdown)

An H2 (Markdown)

An H3 (Markdown)

An H4 (Markdown)

An H5 (Markdown)
An H6 (Markdown)

Using HTML:

An H1 (HTML)

An H2 (HTML)

An H3 (HTML)

An H4 (HTML)

An H5 (HTML)
An H6 (HTML)

Using HTML with an id attribute (expected to be stripped):

An H1 (HTML) An H2 (HTML) An H3 (HTML) An H4 (HTML) An H5 (HTML) An H6 (HTML)

More testing for automatic generation of id and static assignment.

  1. Fun with lists and headings:

    1. Issue 1: This is an h5 in a ordered list
    2. Issue 2: This is an h5 in a ordered list
    3. Issue 3: This is an h5 in a ordered list
  2. This is the same thing in HTML:

    1. Issue 1 (HTML):
    2. Issue 2 (HTML):
    3. Issue 3 (HTML):
  3. HTML with a static id attribute for each <h5>:

    In the preview rendering, the <h5> elements are stripped, but content is displayed.

    1. Issue 1 (HTML with static ID):
    2. Issue 2 (HTML with static ID):
    3. Issue 3 (HTML with static ID):
1
  • 1
    And the result is: HTML <hN> elements with a static id are now stripped. Commented Jul 30, 2021 at 21:15
2

Stack Exchange HLJS Colors

Stacks Color Variable Light Theme Color Dark Theme Color Color Description
--highlight-color
#2f3337

#fff
More or less default text color
(Near Black/ White)
--highlight-comment
#656e77

#999
Grey
--highlight-symbol
#803378

#c59bc1
Magenta
--highlight-keyword
#015692

#88aece
Blue
--highlight-attribute
#015692

#88aece
Blue
--highlight-namespace
#b75501

#f08d49
Orange
--highlight-literal
#b75501

#f08d49
Orange
--highlight-variable
#54790d

#b5bd68
Yellowish-Green
--highlight-punctuation
#535a60

#ccc
Lighter Grey
--highlight-deletion
#c02d2e

#de7176
Red
--highlight-addition
#2f6f44

#76c490
Green

Testing an example link:

Profile for Timothy G. on Stack Exchange, a network of free, community-driven Q&A sites

0
2

🌞 (U+1F31E Sun With Face)
🌙 (U+1F319 Crescent Moon)

1
  • Welcome back Jason! Are you coming to Tavern? Commented Nov 10, 2021 at 7:09
2

Testing out how headers work:

hello

hello

hello

hello

Trying to abuse KBD tags:

[tag:waffles]

[tag:waffles]

[](https://meta.stackexchange.com/questions/tagged/unicorns)

Testing some stuff with flairs: profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites profile for Ekadh Singh - Reinstate Monica on Stack Exchange, a network of free, community-driven Q&A sites

5
  • Not like this ;) Commented Apr 14, 2021 at 19:28
  • @Luuklag how do I correctly format then? I saw the post explaining how to do so with equal signs, triple bars, and dashes, but how do I do so with hashtags? Commented Apr 14, 2021 at 19:30
  • 3
    You need a space after the hashes. Like # Hello Commented Apr 14, 2021 at 19:32
  • 1
    @Yay For testing one type of thing I just repeatedly edit a single post, sometimes out-of-site (deleted), to avoid causing 10K+ users pain. Commented Apr 14, 2021 at 19:34
  • Testing some comment section stuff: &mdash; &ndash; &minus; - Commented Jan 31, 2022 at 18:12
2

Formatting of images in tables:

These examples are made to see what methods work for getting the most out of a table's space.

Default behaviour:

The table adapts to the contents of the first cell, and the contents of the adjacent cell(s) are adapted to that of the first.
The second image in the second cell is forced below the first using a <br/> (or two, rather, so the images have a better looking gap between them):



Using the &nbsp;

Using the HTML &nbsp; entity to fill out the empty space due to the table cells adjusting to the width of the contents of the first cell:



                                                       

Using &nbsp; and <br/>

Using that same trick but preceded by a <br/> to force that the line of non-breaking spaces below the image (such a line can also be put above the image, logically), to prevent the scrollbar from appearing (thank you @Makyen!):




                                                                

Using <img> entities with custom width set

Different aspect ratios behave differently, and there is still a lot of unused space in the table:



Using <img> entities with width and height

It takes a lot more work, but it's indeed doable (the burden of being a perfectionist, I presume). The numbers are guesswork, and the aspect ratios obviously don't correspond with the true dimensions of the images, but it looks good:



Width = 320, height = 640 Width = 370, height = 305 (of both images)

And here's how they all look when the viewport's width changes to something more narrow:

enter image description here

It seems the table with the images in <img> and only their width set wins the beauty contest when viewports of widths < 1265 px are taken into consideration, until the breaking point at 980 px occurs, and the right sidebar is removed. But then it immediately adapts to the viewport's width, so it only looks okay - depending on contents - for a few tens of pixels.

2

Spoiler:

Not spoiled!

Spoiled!

Not spoiled!

0
2

not quoted, but highlighted

printf("here's some code\n"); int x = 99 + 100; 

quoted and highlighted

printf("here's some code\n"); int x = 99 + 100; 
2

Testing comment upvote by low rep user.

1
  • hey sockboy, just a test Commented May 2, 2022 at 13:54
2

You should call foo(bar = TRUE). The bar argument is very important because it prevents foo overflow.

1
  • Thanks, this really helped! Commented May 19, 2022 at 15:45
2

Stacks editor is broken. This is a proof.

Proof
2

Testing spoilers and code fences:

none ! code block ! Text block none ! code block ! Text block

Hmm...

none ! code block !
Text block
none ! code block !
Text block

none code block
Text block asd asd
Text block

2

The following text is from answer to: "How to indent a few lines in Markdown markup?" by AgainPsychoX. It is under a CC BY-SA 4.0 license.

This is normal text.


This gets indented, without enumeration nor dots.

Multiple levels seems to be possible?

Yes, but syntax gets messy, unless you write it single line :)
2

Testing something with new editor and its ability to convert local links to question titles.

Some links which should get converted to question titles:


Highlighting:

print('test') 
0
2

Testing server-side rendering of NBSP in inline code:

" ".join(map(shlex.quote, sys.argv))

2

Text Fragment Linking

test1 [text](link)

test2 [text][ref]

test3: https://example.com/#:~:text=illustrative%20examples

test4: https://example.com/#:~:text=illustrative%20examples

test5 <a href="">...</a> works

<a href="https://example.com/#:%7E:text=illustrative%20examples"> <a href="https://example.com/#:%7E:text=illustrative%20examples"> <a href="https://example.com/#:%7E:text=illustrative%20examples"> <a href="https://example.com/#:%7E:text=illustrative%20examples"> <a href="https://example.com/#:~:text=illustrative%20examples"> 

Using all allowed URL Code points

https://url.spec.whatwg.org/#url-code-points

test1

test2

test3: https://example.com/!$'()*+./:;=?@_~&,-

test4: https://example.com/!$'()*+./:;=?@_~&,-

test5

<a href="https://example.com/#!$%27()*+./:;=?@_%7E&amp;,-"> <a href="https://example.com/#!$%27()*+./:;=?@_%7E&amp;,-"> <a href="https://example.com/#!$%27()*+./:;=?@_%7E&amp;,-"> <a href="https://example.com/#!$%27()*+./:;=?@_%7E&amp;,-"> <a href="https://example.com/#!$%27()*+./:;=?@_~&amp;,-"> 

  • ~ : percent-encoded, unless <a> element used.
  • ' : percent-encoded always
2
text match regex replaced
`` .* foo
a .* foofoo
ab .* foofoo
^.*$ foo
a ^.*$ foo
ab ^.*$ foo
2

html <h1>Heading1</h1> <details>Some details</details>

1
  • html <html><h1>Sample comment</h1> <details>This comment comes from python stackapi</details><html> Commented Aug 26, 2022 at 2:15
2

Tabs being converted to spaces

In code fences:

 this is a test this is a test this is a test 

In a <pre><code> block:

 this is a test this is a test this is a test

In a <pre><code> block using HTML entities:

	this is a test 	this is a test 	this is a test
2

This is a test image:

enter image description here

2

HTML stuff (markup) in a Markdown table:

syntax /
     example
explanation / comment
thing1:thing2 Greek letters:
  • alpha,
  • beta, and
  • gamma (γ).
2

this is a test of embedding links into block quotes

2

Test wrong formatting from new editor:

Single line

`

const hello = "world"; 

`

Multi line

`

const hello = "world"; const foo = 42; console.log(hello, foo); 

`

Single line more backticks

`

const hello = "world"; 

`

Multi line more backticks

`

const hello = "world"; const foo = 42; console.log(hello, foo); 

`

2

Table | Foo | Bar | Baz | | --- | --- | --- | | 123 | 456 | 789 |

Fullwidth symbol and URL:https://example.com/

The rendering of the preview during editing and the actual rendering are different.

1
2

Posting an answer so that I can test stuff with comments

Editing so that other reviewers don't have to waste their time on a formatting sandbox answer (editing from the review queue marks the review item as completed).

1
  • 1
    Thanks for the answer! Commented Apr 25, 2019 at 15:36
2

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

1
2

This is just a test answer for images.

screenshot
(source: googleapis.com)

2
  • @Glorfindel lol you should put exception in your script to ignore the sandbox, can't see much point fixing broken images here. (Unless of course you post them on purpose for testing, but that's not the case.) Commented Feb 16, 2023 at 12:16
  • 1
    @ShadowWizardChasingStars yes, you're right ... Commented Feb 16, 2023 at 12:17
1 2 3
4
5
11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.