Fandom

Infobox Wikia

Tag

224pages on
this wiki
Add New Page
Comments0 Share

Tags generally refers to fragments of HTML, XHTML, or XML used to define and organize some form of data or presentation. MediaWiki and Fandom wikis implement some custom tags that provide unique data, function, or presentation on their wikis. Some wiki extensions also implement custom tags.

Structure

A tag is denoted by angle brackets enclosing the tag.

  • Example:
    • <pre>

After the first tag, the start tag, follows the content. At the end, a closing tag will follow, which is the same as the opening tag, except for a slash in front of the tag name.

  • Example:
    • </pre>

Some tags implement their feature on the spot they are placed, and do not require a closing tag. However, for XML, you have to add a slash at the end of the tag, otherwise you'll get an error. This is not required, but still valid, for HTML.

  • Example:
    • <br /> for XML and <br> for HTML.

To change the default behavior of a tag, you can use attributes. An attribute is placed in the start tag, after the name of a tag, separated by a single space. An attribute consists out of two parts, separated by an equals (=) sign. The first part is the attribute name, which denotes what to change. The second part is the value, enclosed by quotes. Multiple attributes can be used in one tag, provided they are separated by a single space.

  • Example:
    • <gallery type="slider">, which changes the type of the gallery to a slider.
    • <gallery type="slideshow" hideaddbutton="true">. Changes the gallery to a slideshow and hides the "add photo" button.

An extensive list of attributes can be found on the HTML attribute page on Wikipedia.

Portability specific

See also

External links

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.