Difference between revisions of "User:Shawndouglas/sandbox"
Shawndouglas (talk | contribs) (Added more content.) |
Shawndouglas (talk | contribs) (Added more content.) |
||
Line 7: | Line 7: | ||
==Sandbox begins below== | ==Sandbox begins below== | ||
===Linking=== | |||
This is me making an internal link to the template "ombox," which is used on this page: [[Template:Ombox]] | This is me making an internal link to the template "ombox," which is used on this page: [[Template:Ombox]] | ||
Line 16: | Line 18: | ||
This is me making an external link to the same template located on Wikipedia, using different link text: [http://en.wikipedia.org/wiki/Template:Ombox Why is there no pipe in this type of link?] | This is me making an external link to the same template located on Wikipedia, using different link text: [http://en.wikipedia.org/wiki/Template:Ombox Why is there no pipe in this type of link?] | ||
Here are some links to pages on this wiki that utilize templates: | |||
===Templates=== | |||
Notice the info box at the top? That's created using the template "ombox," referenced above. Click one of those links to learn more about this template. | |||
Templates are noticeable because they contain two braces in front (like this: <nowiki>{{</nowiki> ) and two in the back (like this: <nowiki>}}</nowiki> ). | |||
Here are some links to pages on this wiki that utilize templates. Let's look at each page and choose the "edit" option to see the code: | |||
* [[LIMS vendor]] | * [[LIMS vendor]] | ||
Line 22: | Line 31: | ||
* [[2nd Sight Solutions]] | * [[2nd Sight Solutions]] | ||
* [[National Cancer Institute]] | * [[National Cancer Institute]] | ||
===Formatting text=== | |||
====Bold text==== | |||
'''Here I bold this text for effect''': Do you think it looks ok? | |||
I can even make a link appear in bold like this: '''[[LIMS vendor]]''' | |||
====Italic text==== | |||
''Here's italic text for you'': What do you think? | |||
Like bold text, I can italicize a link like this: ''[[LIMS vendor]]'' | |||
====Preformatted text==== | |||
Open the "LIMSWiki:Vendor page" using the link above in the Templates section. You can open it in a new tab/window by right-clicking the link and choosing the appropriate option. | |||
You'll notice that there are two gray boxes with wiki code in them on this page. How do you display that wiki code like that without the browser running it? By using the preformatted text tag: | |||
<pre><pre>This is preformatted text. Here is the ombox code used on this page: | |||
{{ombox | |||
| type = notice | |||
| style = width: 960px; | |||
| text = This is my sandbox, where I play with features and test MediaWiki code. If you wish to leave a comment for me, please see [[User_talk:Shawndouglas|my discussion page]] instead.<p></p> | |||
}} | |||
</pre></pre> | |||
So you essentially use the <nowiki><pre></nowiki> tag to display the code without rendering it. In the sentence previous to this, I used a different technique, however, to display the tag: | |||
<pre> | |||
So you essentially use the <nowiki><pre></nowiki> tag to display the code without rendering it. | |||
</pre> | |||
I used the <nowiki><nowiki></nowiki> tag to display what would otherwise be rendered as code. Note that with both tags, I had to "close" their use with a corresponding duplicate but with the "/" character in front of the word. | |||
This may seem a bit confusing at first, but don't worry. You won't use it often. I wanted to introduce it for the next topic: spacing. | |||
====Spacing==== | |||
This is my first line of text. | |||
This is my second line of text. | |||
Here's what I entered into the edit box to get the above to appear: | |||
<pre> | |||
This is my first line of text. | |||
This is my second line of text. | |||
</pre> | |||
Notice what happens if I don't put a space between the lines of text in the edit screen? The lines run together. You'd think putting a line under another with a hard return would be enough, but it's not. You must add an additional hard return, creating a space between the lines in the edit box. | |||
I actually want it to look like this: | |||
This is my first line of text. | |||
This is my second line of text. | |||
So I have to edit it like this in the code: | |||
<pre> | |||
This is my first line of text. | |||
This is my second line of text. | |||
</pre> |
Revision as of 23:20, 15 February 2012
This is my sandbox, where I play with features and test MediaWiki code. If you wish to leave a comment for me, please see my discussion page instead. |
Sandbox begins below
Linking
This is me making an internal link to the template "ombox," which is used on this page: Template:Ombox
This is me making an internal link to the template "ombox," but this time making different text appear for the link: I'm such a rebel
This is me making an external link to the same template located on Wikipedia: [1]
This is me making an external link to the same template located on Wikipedia, using different link text: Why is there no pipe in this type of link?
Templates
Notice the info box at the top? That's created using the template "ombox," referenced above. Click one of those links to learn more about this template.
Templates are noticeable because they contain two braces in front (like this: {{ ) and two in the back (like this: }} ).
Here are some links to pages on this wiki that utilize templates. Let's look at each page and choose the "edit" option to see the code:
Formatting text
Bold text
Here I bold this text for effect: Do you think it looks ok?
I can even make a link appear in bold like this: LIMS vendor
Italic text
Here's italic text for you: What do you think?
Like bold text, I can italicize a link like this: LIMS vendor
Preformatted text
Open the "LIMSWiki:Vendor page" using the link above in the Templates section. You can open it in a new tab/window by right-clicking the link and choosing the appropriate option.
You'll notice that there are two gray boxes with wiki code in them on this page. How do you display that wiki code like that without the browser running it? By using the preformatted text tag:
<pre>This is preformatted text. Here is the ombox code used on this page: {{ombox | type = notice | style = width: 960px; | text = This is my sandbox, where I play with features and test MediaWiki code. If you wish to leave a comment for me, please see [[User_talk:Shawndouglas|my discussion page]] instead.<p></p> }} </pre>
So you essentially use the <pre> tag to display the code without rendering it. In the sentence previous to this, I used a different technique, however, to display the tag:
So you essentially use the <nowiki><pre></nowiki> tag to display the code without rendering it.
I used the <nowiki> tag to display what would otherwise be rendered as code. Note that with both tags, I had to "close" their use with a corresponding duplicate but with the "/" character in front of the word.
This may seem a bit confusing at first, but don't worry. You won't use it often. I wanted to introduce it for the next topic: spacing.
Spacing
This is my first line of text. This is my second line of text.
Here's what I entered into the edit box to get the above to appear:
This is my first line of text. This is my second line of text.
Notice what happens if I don't put a space between the lines of text in the edit screen? The lines run together. You'd think putting a line under another with a hard return would be enough, but it's not. You must add an additional hard return, creating a space between the lines in the edit box.
I actually want it to look like this:
This is my first line of text.
This is my second line of text.
So I have to edit it like this in the code:
This is my first line of text. This is my second line of text.