Creates an annotation for annotated images, for example in the diagram on the right the labels for the various extinctions are generated by Template:Annotation:
Creates an annotation for annotated images, for example in the diagram on the right the labels for the various extinctions are generated by Template:Annotation:
| This template will malfunction unless used within the templates Annotated image or Annotated image 4. |
{{Annotation | left (in px)| top (in px) | text | text-align=left | font-size-css=85% | font-weight=bold | font-family=Times New Roman | background-color=#ffcccee | color=blue |line-height=1}}
where:
|font-size-css=85%. Keep in mind that In no case should the resulting font size of any text drop below 85% of the page's default font size.(from MOS:SMALL)
Some of the parameters have alternative names that are used by containing templates to call Template:Annotation. The alternative names are provided in case the containing templates call other templates that use similar parameters.
These alternative names are provided so that the containing templates can provide default values for the corresponding parameters in Template:Annotation, and should not be used for any other purpose. Values specified using the basic parameter names listed above will over-ride the alternative names that are used by containing templates.
Here are the alternative names and the basic Template:Annotation parameters for which they set defaults:
| Alternative name | Basic name |
|---|---|
| annot-text-align | text-align |
| annot-font-size | font-size |
| annot-font-weight | font-weight |
| annot-font-family | font-family |
| annot-background-color | background-color |
| annot-color | color |
TemplateData for Annotation
Creates an annotation for annotated images. This template will malfunction unless used within the templates {{Annotated image}} or {{Annotated image 4}}.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Left (in pixels) | 1 | Position of the annotation (in pixels) relative to the left of the box that contains the image. | Number | required |
| Top (in pixels) | 2 | Position of the annotation (in pixels) relative to the top of the box that contains the image. | Number | required |
| Text | 3 | Text that will be displayed. | Content | required |
| Text alignment | text-align | This can be set to left, center or right, and is only noticeable when the annotation spans multiple lines.
| String | optional |
| Font size (pixels) | font-size | Font size in pixel units. CSS relative sizes are not supported; use "Font size (percentage)" to comply with MOS:SMALL for accessibility. | Number | optional |
| Font size (percentage) | font-size-css | Compatible with sizes in % or other CSS relative sizes. Keep in mind that "In no case should the resulting font size of any text drop below 85% of the page's default font size." (from MOS:SMALL)
| String | optional |
| Font weight | font-weight | no description
| String | optional |
| Font width | font-stretch | Alter text width with one of the pre-selected parameters, or alternatively a percentage number.
| String | optional |
| Font family | font-family | The CSS name for the font.
| String | optional |
| Background color | background-color | Defaults to transparent if not specified. | String | optional |
| Color | color | Color of the text and defaults to black if not specified, which is the default text color in most Wikipedia style sheets. In particular, it's best to use blue only for links. | String | optional |
| Line height | line-height | Set the line height. Only noticeable when the annotation spans multiple lines.
| String | optional |
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.