This is the simplest togglebox, with just a tab tag without any attributes, surrounding this text. Its label will switch between the value of [[MediaWiki:tabs-toggle-open-placeholder]] and [[MediaWiki:tabs-toggle-close-placeholder]]. Tab 1 is a named tab without specified index. Tab 2 is a named tab, but with a specified index equal to the default 2. Tab 3 is an unnamed tab, with a specified index (4) of higher than the default (3), which makes it fall back to the name attribute's value. Its name attribute, even though it's defined, is left blank though, so it will fall back to the default, defined in [[MediaWiki:tabs-tab-label-placeholder]]. This is another tab tag, but has a specified ''index'' of 1, so this shows when tab 1 is selected This is another tab tag, but has a specified ''name'' of equal to the second tab's ("world"), so this shows when tab 2 is selected. It also has a defined style, class, id and title attribute. This is another tab tag, but has a specified ''name'' of equal to the third tab's ("Tab 3", the default value). This still shows when tab 3 is selected, even though tab 3 had no name specified itself. This bottom text always shows, since it's not placed within a tab tag. This parent ''tabs'' tag is also a demonstration of the style, class and id attributes. This is an inline example of inline tabs, which demonstratesshowsgives you the freedom in choosing where you want to place your nested tabs. And this part will only show for tab 3. Look, it's multiline! This also demonstrates that tab contents use the display:inline-block; style, which can be changed by either adding the ''inline'' or ''block'' attribute, and not setting its value to "false" or "0". This part also only shows for tab 3, but this has a ''block'' attribute that's not set to "false" or "0". Note that the third tab has the default tab label. This is because a tab tag without defined name was used first, and then only after that the name was defined. It is important to define the name in the first usage of the tab, because only the name assigned to the first usage will be used. This togglebox demonstrates the use of openname and closename attributes, and has a ''collapsed'' attribute that's not set to "false" or "0".
It also has a defined name attribute, which is not used, since the open/closename attributes are defined.
This togglebox has a name, container and title attribute, as well as an index attribute. The index attribute has no purpose in unnested tab tags though, so that is ignored. Here you can see an inline togglebox. It just shows up out of thin air! This togglebox has an ''inline'' attribute that's not set to "false" or "0". This tabsbox has a list of tabs with a name defined earlier at the top of this tab. This is useful when making templates that might want to use tabs to switch at multiple locations within its body. Referring to the tabs can then be done simply via assigning the index attribute to it. ---- This text has a lot ofmany switching parts, whichand that makes it easiersimpler to just use the sameidentical syntax everywherefor each tab. This togglebox's contents do {{#if:1||not}} allow parser functions like #if: to be used This tabs tag is left without any <tab> tags in it. No tabs will be rendered, but the styling of the tab content will remain. This is an example of a <tabs> tag nested inside a <tab> tag. {{#tag:tab|This is a tab inside a tabs inside a tab tag.}} {{#tag:tab|And this is tab 2}} This is a test of a <tab> tag within another <tab> tag within a <tabs> tag: {{#tag:tab|But you won't see this until you open it|collapsed=true}} {{#tag:tab| {{#tag:tabs|If for some reason someone thinks he's funny by nesting 2 <tabs> tags within each other, this will happen.}} }}