Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

The mbox, or message box template is designed for general messages to viewers. The mbox template is intended to create a way for users to create message or notice templates with ease. See below for usage:


The code above is all it takes to create a nice-looking message box. Let's go through what each parameter means (keep in mind all parameters are optional, meaning that if you don't want to change one from its default you can leave it out without consequence):

  • bg is background color. For this you can use a hexadecimal value (i.e. #5A3456, #fff, etc.) or, if the color you have in mind is very general, you may just type the name of the color (i.e. red, blue, etc.). If no parameter is specified here, the default background color will be #eee (light gray/grey).
  • fg is the foreground color. This is the color all text on this template will appear in. It can be entered in the same way as for background color above. If no parameter is specified, the default foreground color will be black.
  • image is the name of the file representing the image. This argument should only include the name of the file and the file type (i.e. Logo.png). DO NOT include "File:", that is already done for you. Also do not include any extraneous file parameters, including size, alignment, or image captions. ONLY the image name and file type. If no parameter is specified here, the image File:Wiki.png will just be shown instead.
  • caption is the bold text that will be the first line. This should be a header or a summarizing sentence. This will include a line break below it. If no parameter is specified here, no caption will be shown.
  • message is a description that provides more detail. This should be longer than the caption parameter, as it should provide more specific information. If no parameter is specified here, no message will be shown.

Now, here is an example of how the mbox template will look when all parameters are satisfied:

Stop x nuvola.svg
This is the caption!This is the message! Remember to include lots of details here!

Here is the code that was used to create the above mbox:

|image=Stop x nuvola.svg
|caption=This is the caption!
|message= This is the message! Remember to include lots of details here!
The above text is transcluded from Template:Mbox/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Mbox/doc. (View all subpages of this page.)
Community content is available under CC-BY-SA unless otherwise noted.