This generates a HTML heading element for use in applying semantically-correct headings to works when == Equals syntax == is insufficient (perhaps because you want to apply a class, or have multiple lines).

It explicitly has no support for direct CSS formatting: it is designed for use with classes and/or index-specific CSS.

By default, the headings have the normal MediaWiki font sizes for headings, but are centred, not bolded and do not have an underline.

  • level The heading level (default: 2)
  • class Optional CSS classes (use this if you have multiple heading styles in a single work). The top-level heading element always has class .wst-heading as well as additional classes.
  • id Optional ID (used as an anchor). If not given the contents of the first line is used. This parameter should also be used to add an suitable simple id, if markup or complex formatting is used in the first line (such as a footnote directly associated with the heading.)
  • 1, 2, etc. The lines of the header. Each line is in a span under the default span with class .wst-heading-line and can be targeted with :nth-child as needed.

Example

{{classed heading|l=2|Line 1|Line 2}}
{{lorem ipsum}}

Line 1Line 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Example

{{classed heading|l=3|Line 1|Line 2}}
{{lorem ipsum}}

Line 1Line 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Common CSS examples

మార్చు

There are a few common styling choices you may wish to replicate. You can target specific levels using the hN tag names.

Margin/leading underneath the heading

మార్చు

Example: Page:Ayn Rand Anthem.pdf/21 (using Index:Ayn Rand Anthem.pdf/styles.css)

h3 .wst-heading-line {
    margin-bottom: 1.5em;
}

Small-caps for the second line onwards

మార్చు
h3 .wst-heading-line:nth-child(n+2) {
    font-variant: small-caps;
}

Also consider all-small-caps if you want Proper Nouns to appear in "all small caps", including the first letters: e.g. Oxford.

Left-aligned titles

మార్చు

Example: Page:The Sundering Flood - Morris - 1898.djvu/15 (using Index:The Sundering Flood - Morris - 1898.djvu/styles.css)

h3 .wst-heading {
    text-align: left;
}
  • {{heading}} if you need to use direct inline CSS formatting rather than via classes
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly error report for this template.

TemplateData for Classed heading


Add an HTML header with optional classes

మూస పరామితులు

ఈ మూసకు, పరామితుల ఇన్‌లైను ఫార్మాటింగు కావాలి.

పరామితివివరణరకంస్థితి
levellevel l

The level of the heading (1 is the "biggest" heading)

అప్రమేయం
3
ఉదాహరణ
3
సంఖ్యసూచించినవి
11

First line of heading

ఉదాహరణ
Chapter 1
లైనుతప్పనిసరి
22

Second line of the heading

ఉదాహరణ
Down the Rabbit-Hole
లైనుఐచ్చికం
classclass

Optional class to use to target specific CSS

ఉదాహరణ
chapter_heading
లైనుఐచ్చికం
idid

ID of the header - can be used for linking to sections

అప్రమేయం
Contents of the first line (parameter 1)
ఉదాహరణ
chapter1
తెలియనిదిఐచ్చికం