Help:Long parameter demo
This is the result of calling Template:P1 se with a parameter value that is a long string of wikitext, look in the edit box, and see the opening braces a little below, and the closing braces at the end. It is a copy of part of Help:Images and other uploaded files with the template calls and a separate pipe in nowiki tags. It demonstrates that a parameter value can have (the wikitext for) sections, links, and images.
Start of parameter
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/- |
Contents
To add an image, the image file has to be uploaded. Also other files can be uploaded, see below. The system uses the term "image" for any uploaded file.
First give the file a suitable name, because renaming during or after uploading is not possible. Make sure that the file name has the proper extension.
With the file an image page (also called "image description page") will be associated, with a page name consisting of the file name (including extension), prefixed with "Image:" (or in general the value of variable {{ns:Image}}). Thus the file names are case-sensitive (this applies even for the file name extension) except, in most projects, for the first character.
Although on each project files can be uploaded, a family of projects may have designated one in particular for this, with sharing of those files enabled. For Wikimedia projects this is Wikicommons (free content only, no "fair use" content), in general this is referred to below as Commons.
To upload a file, go to Commons, log in there, and upload the file using the upload link commons:Special:Upload.
Image at the left
[[image:tst.png|left|thumb|50px|[[help:contents|demo]]]] puts the image at the left; text that follows floats to the right of it; if a second image immediately comes after the first, the second abuts to the right side of the first; if there is text in between then the second image is at the lower right of the first, under this text:
text text text text text text text text text text text text text text text text between the 3rd and 4th images.
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text after the 4th image.
With [[image:tst.png|none|thumb|50px|[[help:contents|demo]]]] the image is put at the left, and text that follows starts below it.
text text text text text text text text text text text text text text text text text text text text text text text text text text text text
Image at the right
[[image:tst.png|right|thumb|50px|[[help:contents|demo]]]] puts the image at the right; text that follows floats to the left of it. The situation is not symmetric with the case above: a second image is put at the extreme right again, under the first.
text text text text text text text text text text text text text text text text text text text text text text text text text text text text after the 1st image.
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text after the 2nd image.{{clr}}
Using full width again
Use <br style="clear:both;" />, or on projects that have Template:Clr (Meta and en:): {{clr}}. Text floats around the image until it gets to {{clr}} (in Meta) like this.{{clr}}After {{clr}}, however, text can float no longer, and restarts from under the image, using the full width again like this,...... like this, like this, like this, like this, like this, like this, like this.
Inline images
Inline images cannot have a caption, but they can have a "title"-attribute (often misidentified as the "alt" attribute, which has a different purpose), which is shown in the hoverbox (in the cases above, for the image it is the same as the caption, and for the enlarge icon it is "Enlarge"). It is the last item of the image code, hence, if there is only the image name with prefix "image:" it gives that; if there is an empty item by ending with a pipe character ("|") it gives none; otherwise, it gives the image code item that happens to be last, unless a proper text is specified.
The size of the images can be reduced but they can not be enlarged.
Example (note the hoverbox too): "text [[image:tst.png]] text [[image:tst.png|5px|]] text [[image:tst.png|500px|demo]] text" gives "text File:Tst.png text File:Tst.png text demo text".
See also below.
See also
- Help:Image page
- w:Wikipedia:Extended_image_syntax
- Parser_testing#Pictures
- w:Wikipedia:Image use policy
- w:Multimedia
- Help:Editing.
- Uploading files (about installation)
- Thumbnailed images
- SVG image support
- Image pages/Data syntax
- Image pages
- Sample image copyright case
- Fixing transparent PNGs
Links to other help pages
- Help contents
- Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary · Commons: · mw: · b: · s: · mw:Manual · Google
- Versions of this help page (for other languages see further)
- Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary
- What links here on Meta or from Meta · Wikipedia · MediaWiki
- Reading
- Go · Search · Stop words · Namespace · Page name · Section · Backlinks · Redirect · Category · Image page · Special pages · Printable version
- Tracking changes
- Recent changes (enhanced) | Related changes · Watching pages · Diff · Page history · Edit summary · User contributions · Minor edit · Patrolled edit
- Logging in and preferences
- Logging in · Preferences · User style
- Editing
- Starting a new page · Advanced editing · Editing FAQ · Edit toolbar · Export · Import · Shortcuts · Edit conflict · Page size
- Referencing
- Links · URLs · Piped links · Interwiki linking · Footnotes
- Style and formatting
- Wikitext examples · CSS · Reference card · HTML in wikitext · Formula · List · Table · Sorting · Colors · Images and file uploads
- Fixing mistakes
- Show preview · Testing · Reverting edits
- Advanced functioning
- Expansion · Template · Advanced templates · Parser function · Parameter default · Variable · System message · Substitution · Array · Calculation · Embed page
- Others
- Special characters · Renaming (moving) a page · Talk page · Signatures · Sandbox · Legal issues for editors