Difference between revisions of "User:Deborah/coding"
| Line 49: | Line 49: | ||
<nowiki>{{{myage|car}}}</nowiki> creates a parameter named myage for a template whose default is car | <nowiki>{{{myage|car}}}</nowiki> creates a parameter named myage for a template whose default is car | ||
| + | |||
| + | |||
| + | named parameters for example <nowiki>{{myage}}</nowiki> versus <nowiki> {{{1}}} or {{{2}}} or {{{3}}}</nowiki> do not have to be put in any particular order | ||
| Line 55: | Line 58: | ||
you would put <nowiki>{{User age|12}}</nowiki> for the template to display, 12 is my age | you would put <nowiki>{{User age|12}}</nowiki> for the template to display, 12 is my age | ||
| + | |||
| + | another example let us say there is a template called Template:User age, that looks like this, <nowiki>{{{1}}} is my age, I was born in the month, {{{2}}}</nowiki> | ||
| + | |||
| + | you would put <nowiki>{{User age|12|December}}</nowiki> for the template to display, 12 is my age I was born in the month December | ||
| Line 60: | Line 67: | ||
you would put <nowiki>{{User age|myage=19}}</nowiki> for the template to display, 19 is my age | you would put <nowiki>{{User age|myage=19}}</nowiki> for the template to display, 19 is my age | ||
| + | |||
| + | |||
| + | another example let us say there is a template called Template:User age, that looks like this, <nowiki>{{{myage}}} is my age, I was born in the month, {{{mymonth}}}</nowiki> | ||
| + | |||
| + | you would put <nowiki>{{User age|myage=19|my month=January}}</nowiki> for the template to display, 19 is my age, I was born in the month, January you also could put <nowiki>{{User age|my month=January|myage=19}}</nowiki> for the same result | ||
Revision as of 18:47, May 2, 2008
How to code for beginners
''Car'' italicizes the word Car
'''Car''' Bolds the word Car
'''''Car''''' Bolds and Italicizes the word Car
[www.nick.com] links to an external site, nick.com
[[Category:A]] adds an article to Category, A
[[:Category:A]] links to the Category, A
[[:Category:Conservapedians|WXYZ]] links to the category, Conservapedians, using the word WXYZ
[[:Image:A.GIF]] links to the picture A.GIF
[[Image:A.GIF]] loads the picture A.GIF on an article
[[Car|Hello]] links to the article Car with the word Hello
[[Car]] links to the article Car using the word Car
{{Car}} adds the template Car to an article
#Redirect[[A]] redirects an article to the article, A
<big>abc</big> makes the text abc bigger
<big><big>abc</big></big> makes the text abc even bigger
<ref>[nick.com]</ref> cites nick.com as a reference for an article's claim
{{Reflist}} makes a list of all the references used in an article
Use a reference more than once in an article
<ref name="a">[nick.com]</ref> is used for the first time
after that simply use <ref name="a"/>
Making templates
{{{1}}} creates a parameter for a template
{{{1|car}}} creates a parameter for a template whose default is car
{{{myage}}} creates a parameter named myage for a template
{{{myage|car}}} creates a parameter named myage for a template whose default is car
named parameters for example {{myage}} versus {{{1}}} or {{{2}}} or {{{3}}} do not have to be put in any particular order
for example let us say there is a template called Template:User age, that looks like this, {{{1}}} is my age
you would put {{User age|12}} for the template to display, 12 is my age
another example let us say there is a template called Template:User age, that looks like this, {{{1}}} is my age, I was born in the month, {{{2}}}
you would put {{User age|12|December}} for the template to display, 12 is my age I was born in the month December
another example let us say there is a template called Template:User age, that looks like this, {{{myage}}} is my age
you would put {{User age|myage=19}} for the template to display, 19 is my age
another example let us say there is a template called Template:User age, that looks like this, {{{myage}}} is my age, I was born in the month, {{{mymonth}}}
you would put {{User age|myage=19|my month=January}} for the template to display, 19 is my age, I was born in the month, January you also could put {{User age|my month=January|myage=19}} for the same result