MediaWiki User Guide/Sections and Headings
Headings are created using sequences of "=" characters, placed before the heading title and after the heading title, on the same line. The level of headings is determined by the number of "=" characters.
Start level: 2 
Do not use headings of level 1, such as "=Title="; start with level 2 instead. The heading at level 1 is used for the title of the page.
Maximum level: 6 
The maximum level of a heading is 6, rendered using ======Heading L6======. Entering a heading with 7 equals-signs such as =======Heading L7======= results in the creation of a heading of the level 6, with one equal-sign becoming part of the text of the heading: "=Heading L7=".
Depending on the convention that users and editors adopt, there can be any number of spaces between the "=" characters and the title.
An example without spaces:
An example with spaces:
== Plants ==
Table of contents 
By default, the titles of headings appear in the table of contents, shown at the top of the page. To prevent having a table of contents, put the "__NOTOC__" sequence of characters into the page. To force the presence of table of contents on a specific place of the page, use "__TOC__".
Headings not in TOC 
There is no simple way to make a heading not appear in the table of contents. For a complex way requiring the adjustment of the MediaWiki software, see Meta:Help:Section.
Customizing TOC 
There are various ways how to customize the table of contents. For instance, to place it to the right, use:
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
Editability of sections 
By default, all sections are editable separately, without the need to see the complete text of the page.
To make all the sections on a page non-editable, place __NOEDITSECTION__ anywhere on the page.
There is no simple way to make a single section non-editable, AFAIK.