Shortcut:
S:STYLE

Scratch Wiki Style Guide

This is not a cheatsheet for formatting. For that, see Scratch Wiki:Cheatsheet. This is a guide for how best to use markup when there are multiple possibilities that all work the same way. Generally, if one method is picked over others, that method is the most readable. However, occasionally it might be picked because it saves the most space.

These rules do not have to be followed. They are purely for readability and/or page size savings. In fact, there will be some cases where one of the rules must be broken - which is perfectly fine. In fact, for some of these rules, there are explicit exceptions, specified by "except" in the rule description. In any other case, however, these rules should be followed.

If a page breaks one of these rules deliberately, place {{good style|<rule code>}} to prevent bots from adding {{bad style}} automatically.

Description Don't Do Description of style rule
Bold and/or italic text
text''' bold '''text
text'' italic ''text
text''''' wow '''''text
text '''bold''' text
text ''italic'' text
text '''''wow''''' text
Never have spaces in between the five apostrophes and the bolded and italicized text. (no-spaces-inside-apos)
Link to another page
[[Link_title]]
[[Link_title|link text]]
[[Link title]]
[[Link title|link text]]
Link to another page
https://en…/wiki/Page
[https://en…/wiki/Page text]
[[Page]]
[[Page|link]]
Link to internal heading
[[#A_B.3F]]
[[#A_B.3F|text]]
[[#A B?]]
[[#A B?|text]]
Never use underscores or .xx escapes in heading links. (no-section-underscores)
Add a page to a category
[[Cat…:Cat_Name]]
[[Cat…:Cat Name]]
Never use underscores in category links. (no-cat-underscores)
Add a page to a category
[[Category:Category]]
…page content…
…page content…
[[Category:Category]]
Category links must always go at the bottom of the page (not including interwiki links). (cat-at-end)
Add a page to a category
[[Cat…:A]] [[Cat…:B]]
[[Cat…:A]][[Cat…:B]]

OR

[[Category:A]]
[[Category:B]]
The only whitespace allowed between category links is a single newline. (multi-cat-whitespace)
Link to a category page
[[Category:…]]
[[:Category:…]]
Signing posts on a talk page
<scratchsig>user</scratchsig>
~~~~
Always use ~~~~, which produces your signature and a timestamp. (four-tildas)
Use a template
{{Template name}}
{{template Name}}
{{template name}}
{{Template Name}}
Never capitalize the name of the template, except when any other letter in the name is also capitalized (e.g. {{NotUseful}} or {{Wiki Standards}} should be used instead of {{notUseful}} or {{wiki Standards}}) (no-capitalized-templates)
Use multiple templates
{{April Fools}}{{stub|date=August 2018}}{{about|A|B|Page Name}}{{other version|2.0|1.4}}[[File:A.png|thumb|A thing.]][[File:B.png|thumb|B thing.]]
{{April Fools}}
{{stub|date=August 2018}}
{{about|A|B|Page Name}}
{{other version|2.0|1.4}}
[[File:A.png|thumb|A thing.]]
[[File:B.png|thumb|B thing.]]
Use only one breaking template (i.e. a template that occupies an entire line anyway) per line. (one-inclusion-per-line)
Multiline a template
{{template name|
param1=value1|
param2=value2
}}
{{template name
|param1=value1
|param2=value2
}}
Put the pipe (|) character at the start of each line, not at the end. (pipe-at-line-start)
Using {{note}}/{{warning}}/{{caution}}
{{note}}text
{{warning}}text
{{caution}}text
{{note|text}}
{{warning|text}}
{{caution|text}}
Always pass the text as a parameter instead of using it outside the template - passing it as a parameter prevents wrapping past the template. (nwc-param-text)
Using {{main}}
{{main|Page_title}}
{{main|Page title}}
Never use underscores in page titles. (no-main-underscores)
Redirect to another page
#REDIRECT [[page_title]]
#REDIRECT [[Page title]]
Never use underscores in the redirect target, and always capitalize the first letter. (no-redirect-underscores)
Redirect to another page
#REDIRECT [[Page]][[Cat…:C]]
#REDIRECT [[Page]]
[[Category:C]]
When the redirect needs a category (such as Category:Shortcuts), put the category link on the next line. (redirect-category-newline)
Redirect to a section of another page
#REDIRECT [[A#B_C.21]]
#REDIRECT [[A#B C!]]
Never use underscores or .xx escapes in the redirect target section. (no-redir-section-underscores)
Section headings
…more content…
==Heading==
…more content…
…more content…

== Heading ==
…more content…
Add an extra blank line before the heading, and optionally add a space before and after the heading title. (whitespace-headings)
Nonindexed headings
; Heading
;Heading
Never have a space between the semicolon and the title. (no-nih-space)
Bulleted list
Start
*One
*Two
:*Two point one
*Three
Done
Start

* One
* Two
** Two point one
* Three

Done
Add an extra blank line before and after the list; add a space after the asterisk(s); never use a colon before the asterisk to indent - just use another asterisk. (whitespace-ul)
Numbered list
Start
#One
#Two
:#Two point one
#Three
Done
Start

# One
# Two
## Two point one
# Three

Done
Add an extra blank line before and after the list; add a space after the number sign(s) (#); never use a colon before the number sign to indent - just use another number sign. (whitespace-ol)
Indenting
: Text
::)
:Text
: :)
Never add a space between the colon and the text, except when the first character of the text would otherwise be treated as wiki markup, e.g. use : *text* instead of :*text*, as the latter would be converted into a bulleted list. (no-indent-space)
References
A<ref>Ref</ref>, B
A, <ref>Ref</ref>B
A,<ref>Ref</ref> B
Put the reference after the punctuation, before the space. (ref-punctuation)
Styling text
a<small> s </small>a
a<big> b </big>a
a<span…> sp </span>a
a<s> st </s>a
a <small>s</small> a
a <big>b</big> a
a <span…>sp</span> a
a <s>st</s> a
Never have spaces in between the tags and the text. (no-spaces-inside-tags)
Horizontal rule
text

----

text
text
----

text
Never have a blank line before the four hyphens. A blank line afterwards is acceptable, however, as a horizontal rule may come before a heading. (no-hr-whitespace)
Any text
text 
text
Never have any whitespace at the end of a line - spaces at the end of a line are almost impossible to detect, and trailing whitespace is never necessary for any purpose (other than the demonstration to the left). (no-trailing-spaces)
Preformatted text
text
 Start with space
text
Never use this at all - it is almost impossible to find when editing. (no-space-pre)
Absolutely preformatted text
<pre>
text
</pre>
<pre>text</pre>
Never add a line break after the opening tag or before the closing tag. (no-pre-space)
Line breaks
line 1
line 2
line 1

line 2
Use two newlines for a paragraph break - a single newline will simply be treated as a space. (two-newline-break)
External links
[https://scratch.mit.edu/discuss/topic/294197/ forum topic]
[https://scratch.mit.edu/discuss/post/3016764/ forum post]
[https://scratcharchive.asun.co/forums/viewtopic.php?id=49826 forum topic]
[https://scratcharchive.asun.co/forums/viewtopic.php?pid=591416#p591416 forum post]
[{{Forum Archive|49826}} forum topic]
[{{Forum Archive|p=591416}} forum post]
[[topic:294197|forum topic]]
[[post:3016764|forum post]]
[[ar-topic:49826|forum topic]]
[[ar-post:591416|forum post]]