Template:Htag

From Angelina Jordan Wiki
Revision as of 16:12, 26 October 2020 by Dcljr (talk | contribs) (allow for full elements; ++docs; + cat:as code)

<html>

Documentation

This template provides a convenient way to render the names of HTML "tags", like <div> and <span>, as well as full HTML elements, like <div>…</div>. It is intended to be used on help pages, in template documentation, in talk page discussions, etc., but not in articles (unless there's a good reason).

The template does not complain about missing input. The output (when no input is provided) is <html>, as seen above.

The name of the template is based on the phrase "HTML tag".

Usage

  • {{htag}}
  • {{htag|tag_name}}
  • {{htag|element_name|content}}

Examples

  • {{htag}}<html>
  • {{htag|span}}<span>
  • {{htag|/span}}</span>
  • {{htag|span|stuff here}}<span>stuff here</span>