User:Jabberwock/codes

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

This page is a compilation of useful HTML codes and wikicodes you can use in writing Uncyclopedia articles.

Basic[edit | edit source]

These are the basic things everyone has to know.

Bold text[edit | edit source]

'''Bold text'''
gives:
Bold text

Categories[edit | edit source]

Inserting [[Category:You]] at anywhere in the page categorizes the page into Category:You.

Censored content[edit | edit source]

The nice ancient Uncyclopedians have made a template for that.

{{C|Censored text}}
gives:
Censored text

To see the censored content, just move your mouse pointer onto it. Alternatively you can use Ctrl+A to see all censored content at once.

Crossed out text[edit | edit source]

<s>Crossed out text</s>
gives:
Crossed out text

Images[edit | edit source]

[[File:Example.jpg|300px|thumb|center|An example image.]]
gives:

An example image.

You can change the "center" in the code to "left" or "right" to put the picture to the left or the right instead. If you omit it, the default is right. Also, you can change the "300px" to other numbers.

Italic text[edit | edit source]

''Italic text''
gives:
Italic text

You can put bold and italics together like '''''bold and italic text'''''. The effect is bold and italic text.

Links[edit | edit source]

[[link]], [[America]]ns, [[shit|you]]
gives:
link, Americans, you

Note that "Americans" links to America and "you" links to shit. The latter kind is especially useful when you want to create an effect such as you are shit.

Links to categories and files[edit | edit source]

As shown in the previous sections, [[Category:You]] categorizes a page instead of giving a link, and [[File:Example.jpg]] transcludes the file. To link to categories and files, use [[:Category:You]] and [[:File:Example.jpg]].

Lists[edit | edit source]

* List item 1
* List item 2
* List item 3
** List item 3-1
** List item 3-2
* List item 4
* List item 5
# Numbered list item 1
# Numbered list item 2
# Numbered list item 3
## Numbered list item 3-1
## Numbered list item 3-2
# Numbered list item 4

Gives:

  • List item 1
  • List item 2
  • List item 3
    • List item 3-1
    • List item 3-2
  • List item 4
  • List item 5
  1. Numbered list item 1
  2. Numbered list item 2
  3. Numbered list item 3
    1. Numbered list item 3-1
    2. Numbered list item 3-2
  4. Numbered list item 4

Templates[edit | edit source]

This section is about using templates. For making templates, see User:Jabberwock/templates.

{{template}}{{a splode}}
gives:

Example.jpg This is an exemplary template.
(Food for thought – chew carefully.)
Exploding-head.gif
THIS PAGE A SPLODE.
Exploding-head.gif

Make sure you spell the template's name correctly. Otherwise, {{temlpate}}{{a spload}} gives:
Template:TemlpateTemplate:A spload

Some templates need inputs. For example, the template C used for censoring text is used like {{C|Censored text}}Censored text. Here the Censored text is the input. Another example is Template:Q for quotes. It can take two or three inputs.
{{Q|Content|Author}}
gives:

“Content”

{{Q|Content|Author|Topic}}
gives:

“Content”

~ Author on Topic

If you don't know what the inputs should be, you might mess the whole thing up. For example:
{{Q|Captain Obvious|this quote|This quote has five words.}}

“Captain Obvious”

~ this quote on This quote has five words.

So, if you are not sure, view the template page. Its URL is https://en.uncyclopedia.co/wiki/Template:(template name), for example, https://en.uncyclopedia.co/wiki/Template:Q. It probably has instructions on how to use the template. If some vandal has removed the instructions, you can visit Special:WhatLinksHere/Template:Q to find a list of other articles that use the template, and use their code for reference.

A third example of a template that needs inputs is Template:Poker.
{{poker|S|7}} gives:

7
 
    7

Sometimes there is a third input rotate for rotating the card. {{poker|S|7|rotate=10}}, the card is rotated by 10 degrees.

7
 
    7

If you input the wrong things, for example, {{poker|7|♠}}, it would give a mess:


7
 
7 7
7
7 7
7
7 7
7
7 7
   
7

Luckily, the template has documentation on its page, Template:Poker.

If you encounter a template with no documentation, you may see how others use it and learn from them. For example, if the author of Template:Poker forgot to write the documentation, you may go to Special:WhatLinksHere/Template:Poker and see what other pages use Template:Poker. Then visit any of the pages that transcludes the template, view its source code, and find out.

Intermediate[edit | edit source]

You can write things without these, but it's best to know them.

[edit | edit source]

{{Title|amogus}}
changes the page title to "amogus".

Alternatively, you can use
{{DISPLAYTITLE:amogus}}
to change both the page title and the title shown on the browser tab.

{{fakelogo|Bouncywikilogo.gif}}
changes the logo to File:Bouncywikilogo.gif, the bouncing Wikipedia logo Bouncywikilogo.gif.

Colored text[edit | edit source]

<span style="color: green;">Green text</span>
gives:
Green text

Change the "green" in the code to red, blue, purple, gray, pink, turquoise, yellow, cyan, yellowgreen or orange, and you can have red text, blue text, purple text, gray text, pink text, turquoise text, yellow text, cyan text, yellowgreen text, orange text and much more. For a full list, see here.

How about links?

<span style="color: red;">Red text, but with a [[link]] in it</span>
gives:
Red text, but with a link in it

The link doesn't turn red. If you also want the link to be red, use:
<span style="color: red;">Red text, but with a [[link|<span style="color: red;">link</span>]] in it</span>
That gives Red text, but with a link in it.

Different fonts[edit | edit source]

<span style="font-family: Comic Sans MS;">This sentence is written in [[Comic Sans]] font.</span>
gives:
This sentence is written in Comic Sans font.

It's very similar to the colored text in the previous section. The only difference is that you use font-family. You can have Comic Sans MS, Times New Roman, Trebuchet MS, Georgia, and Impact. Make sure you spell the font name correctly. A list is available at here.

If you just want a serif font, use:
<span style="font-family: serif;">This sentence is written in some serif font, although I don't care which.</span>
It gives:
This sentence is written in some serif font, although I don't care which.

For sans-serif font: <span style="font-family: sans-serif;">This sentence is written in some sans-serif font, although I don't care which.</span>
This sentence is written in some sans-serif font, although I don't care which.
For monospace font: <span style="font-family: monospace;">This sentence is written in some monospace font, although I don't care which.</span>
This sentence is written in some monospace font, although I don't care which.

You can combine these with text coloring.
<span style="color: yellow; font-family: Comic Sans MS;">This sentence is written in yellow Comic Sans font. Avoid this if you're designing a website.</span>
This sentence is written in yellow Comic Sans font. Avoid this if you're designing a website.

External links[edit | edit source]

[https://google.com This is a link to Google]
gives This is a link to Google.

However, sometimes you don't want to display the link as external. Use
<span class="stealthexternallink">[https://google.com This is a link to Google]</span>
This gives This is a link to Google.

Hide section edit[edit | edit source]

__NOEDITSECTION__

Yes, it's that simple. You can use it to hide the "[edit]" on the right of the sections. But you need to put it onto a separate line in the source code. Also, there are two underlines on each side and the word is capitalized.

Hide table of contents[edit | edit source]

__NOTOC__

It hides the table of contents, and it's like the code described in the previous section in every other way. Put it onto a separate line.

No wiki format[edit | edit source]

<nowiki>[[link]]{{template}}{{a splode}}</nowiki>
gives:
[[link]]{{template}}{{a splode}}

Without nowiki, it would give:
link

Example.jpg This is an exemplary template.
(Food for thought – chew carefully.)
Exploding-head.gif
THIS PAGE A SPLODE.
Exploding-head.gif

Placing letters[edit | edit source]

The letter b in the word "um<span style="position: relative; top: -5px; left: 0px;">b</span>rella" is 5 pixels above where it should be.
gives:
The letter b in the word "umbrella" is 5 pixels above where it should be.

Here, "position: relative;" means that the position of the letter b is calculated based on where it should be. "top: -5px;" looks counterintuitive, but you need the minus sign if you want to move the letter up.

Also:
The letter b in the word "um<span style="position: relative; top: -5px; left: 3px;">b</span>rella" is 5 pixels above and 3 pixels to the right of where it would be if Jabberwock didn't vandalize this page.
gives:
The letter b in the word "umbrella" is 5 pixels above and 3 pixels to the right of where it would be if Jabberwock didn't vandalize this page.

Again, this is counterintuitive. You move the letter to the right, but you put a positive number in "left: 3px;"

If you want the letter or word's position to be at the top left corner of this article:
<span style="position: absolute; top: 0px; left: 0px; color: orange;">This sentence is at the top left corner.</span>
This sentence is at the top left corner.
You can scroll to the top and see the effect. To let you see it easily, I've colored it orange with color: orange; in the code. Note the position: absolute; which puts the orange text at the corner instead of a location relative to the context.

Show page's name[edit | edit source]

{{PAGENAME}}
gives:
Jabberwock/codes

If you put it onto your userpage, it will show your username instead. It is mainly useful in templates.

Also,
{{FULLPAGENAME}}
gives:
User:Jabberwock/codes

{{FULLPAGENAME}} includes the namespace.

Show username[edit | edit source]

{{USERNAME}}
gives:
<insert name here>

If you are not logged in, it gives "<insert name here>". What if you want it to show something else to those who are not logged in? Use:
You are {{USERNAME|not logged in, you fucker}}
You are not logged in, you fucker. If you are not logged in, it would say "You are not logged in, you fuck".

By the way, if you see your own username on a non-talk page, don't panic. The author is probably using the {{USERNAME}} template to insult every reader instead of just you. If you still worry about it, view the page's source code.

Advanced[edit | edit source]

This section is about the more obscure and little-known techniques.

Capitalize text[edit | edit source]

<span style="text-transform: uppercase;">This sentence is entirely in uppercase.</span>
gives:
This sentence is entirely in uppercase.

This would seem useless, since the faster way to capitalize text is to turn on Caps Lock when typing. But what if you need to capitalize the reader's username?

<span style="text-transform: uppercase;">{{USERNAME}}</span> gives: <insert name here>
That's useful, because there's no other way to do it.

Link without underline[edit | edit source]

<span class="nounderlinelink">[[link]]</span>
gives:
link

For the effect, put your mouse pointer onto the word "link". You'll see that no underline appears. But it's a link and you can click it. Compare it with [[link]] which gives "link".

Rotate[edit | edit source]

{{#css:
div {
transform:rotate(1deg);
}
}}

messes up the whole page by rotating every div by 1 degree. There is a messed-up version of this page at User:Jabberwock/codes/rotate.

For more about CSS, see the W3schools tutorial or this Uncyclopedian tutorial.

Show fake categories[edit | edit source]

<div style="border: 1px solid #a2a9b1; background-color: #f8f9fa; padding: 5px; margin-top: 1em; clear: both;">[[Special:Categories|AAAAAAAAAA]]: <ul style="display: inline; margin: 0; padding: 0; list-style: none none;"><li style="display: inline-block; line-height: 1.25em; border-left: none; margin: 0.125em 0; padding: 0 0.5em; zoom: 1;">[[:Category:Uncyclopedia In-Jokes|AAAAAAAAAAAA AA-AAAAA]]</li><li style="display: inline-block; line-height: 1.25em; border-left: 1px solid #a2a9b1; margin: 0.125em 0; padding: 0 0.5em; zoom: 1;">[[:Category:Featured|AAAAAAAA]]</li></ul></div>

This gives:

AAAAAAAAAA: