Help:  Contents | Getting Started | New to BRWiki | Editing BRWiki | Editing BRWiki (advanced) | Communication and Community | Additional Help
The help pages are currently being redesigned so they are more helpful. If you have any comments or are interested in helping out, please see the help team.

 This article or section needs to be cleaned up to a higher standard of quality.
style="Template:stub explanationcss;" |
This may include editing to correct spelling and grammar, rewriting sections to ensure they are clear and concise, and wikifying.

[top]Permitted HTML

The following HTML elements are currently permitted:




















































    • The following excerpt from OutputPage.php additionally shows which attributes are allowed. For many HTML elements, more convenient wikitext code is available, see Editing. On the other hand, HTML tags allow an id that can be referenced in one's user style css, and allows the tag to be used as link target.
      Code:
      	/* private */ function removeHTMLtags( $text )
      {
      wfProfileIn( "OutputPage::removeHTMLtags" );
      $htmlpairs = array( # Tags that must be closed
      "b", "i", "u", "font", "big", "small", "sub", "sup", "h1",
      "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s",
      "strike", "strong", "tt", "var", "div", "center",
      "blockquote", "ol", "ul", "dl", "table", "caption", "pre",
      "ruby", "rt" , "rb" , "rp"
      );
      $htmlsingle = array(
      "br", "p", "hr", "li", "dt", "dd"
      );
      $htmlnest = array( # Tags that can be nested--??
      "table", "tr", "td", "th", "div", "blockquote", "ol", "ul",
      "dl", "font", "big", "small", "sub", "sup"
      );
      $tabletags = array( # Can only appear inside table
      "td", "th", "tr"
      );
      $htmlsingle = array_merge( $tabletags, $htmlsingle );
      $htmlelements = array_merge( $htmlsingle, $htmlpairs );
      $htmlattrs = array( # Allowed attributes--no scripting, etc.
      "title", "align", "lang", "dir", "width", "height",
      "bgcolor", "clear", /* BR */ "noshade", /* HR */
      "cite", /* BLOCKQUOTE, Q */ "size", "face", "color",
      /* FONT */ "type", "start", "value", "compact",
      /* For various lists, mostly deprecated but safe */
      "summary", "width", "border", "frame", "rules",
      "cellspacing", "cellpadding", "valign", "char",
      "charoff", "colgroup", "col", "span", "abbr", "axis",
      "headers", "scope", "rowspan", "colspan", /* Tables */
      "id", "class", "name", "style" /* For CSS */
      );
      E.g., element "a" is not allowed, and the wikitext
      Main Page
      produces the HTML code
      Main Page
      which renders as the wikitext, not working as a link.

      [top]Span

      Span is also not allowed now, but for Wikipedia this is being discussed, see Wikipedia span tags poll.
      The replacement
      can be used, but, oddly, apparently only in a list:
      Code:
      *a <div style="display:inline; color:red">red </div> word
      #a <div style="display:inline; color:red">red </div> word
      a <div style="display:inline; color:red">red </div> word
      gives
      • a

        red
        word
      1. a

        red
        word

      a

      red
      word
      Outside a list "display:inline" is effectively disabled: the code is retained, but with closure of the paragraph before the styled part and starting a new one after it.
      Note that the blank spaces at the end of and just after the styled part are removed; use   at the end:
      class="bbcode_container" |
      Code:
      *a <div style="display:inline; color:red">red &nbsp;</div>word
      gives
      • a

        red 
        word

      [top]Font

      For some attributes, like color, one can also use
      class="bbcode_container" |
      Code:
      a <font style="color: red">red</font> word
      or
      class="bbcode_container" |
      Code:
      a <font color=red>red</font> word.
      giving
      a red word
      a red word
      The font element can even be used to replace span, e.g.
      a height of 20000 <font title="30.48 cm" class="title">ft</font> above sea level
      giving
      a height of 20000 ft above sea level
      (note the hover box over "ft").
      Use a css line like
      .title {color: red; }
      to see which text has a hover box.

      [top]Div

      E.g. to assign the class "red" to a text one can put
      class="red" | example text
      which gives
      class="red" |
      example text
      which is in red if the css line
      .red {color:red}
      is applicable.
      This is suitable if the color is specifically intended to be red; if it is just for emphasis a more general term for the class would be more appropriate, because css allows the user to choose another method of emphasis (another color, bold, enlarged, etc.).
      Note that many readers will not have their own css, specially adapted for such usage, so one cannot refer to "the red text above", etc.

      [top]External links


      Tags for this Page

      Bookmarks

      Posting Permissions

      Posting Permissions
      • You may not create new articles
      • You may not edit articles
      • You may not protect articles
      • You may not post comments
      • You may not post attachments
      • You may not edit your comments
      BIRTHRIGHT, DUNGEONS & DRAGONS, D&D, the BIRTHRIGHT logo, and the D&D logo are trademarks owned by Wizards of the Coast, Inc., a subsidiary of Hasbro, Inc., and are used by permission. ©2002-2010 Wizards of the Coast, Inc.