Tardis:Avoid HTML: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(Created page with "{{mosnav|c=Coding and markup}} {{sc|T:NO HTML}} {{moss|Avoid using HTML in the main namespace. It complicates site maintenance, and creates inconsistencies. The best pl...")
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{mosnav|c=Coding and markup}}
{{mosnav|p=Using wikitext|c=Using wikitext}}
{{sc|T:NO HTML}}
{{sc|T:NO HTML}}
{{moss|Avoid using HTML in the main [[namespace]].  It complicates site maintenance, and creates inconsistencies.  The best place to use HTML is in templates.}}
{{moss|Avoid using HTML in the main [[namespace]].  It complicates site maintenance, and creates design inconsistencies.  The best place to use HTML is in templates.}}


If you want to do "fancy formatting", please do it in a template, and them place the template in the main [[namespace]].  HTML — which is to say commands like {{tt|<nowiki><div>, <span>, <big></nowiki>}} — '''should be avoided''' in the main [[namespace]].   
If you want to do "fancy formatting", please do it in a template, and them place the template in the main [[namespace]].  HTML — which is to say commands like {{tt|<nowiki><div>, <span>, <big></nowiki>}} — '''should be avoided''' in the main [[namespace]].   
Line 9: Line 9:
* If you build tables like infoboxes and navigation templates  with HTML ''directly'' on regular article pages, you make it impossible to update the look of the table '''except by directly editing that particular page'''.  The advantage of templates is that they allow you to make edits to the single template page ''which are then seen on '''all''' the pages that share the template.
* If you build tables like infoboxes and navigation templates  with HTML ''directly'' on regular article pages, you make it impossible to update the look of the table '''except by directly editing that particular page'''.  The advantage of templates is that they allow you to make edits to the single template page ''which are then seen on '''all''' the pages that share the template.
* Templates are much easier for maintenance bots to deal with than HTML statements.
* Templates are much easier for maintenance bots to deal with than HTML statements.
* HTML standards are always in a state of development.  HTML commands are occasionally retired, rendering them useless on pages.  In mid-2012, for instance, Wikia upgraded to HTML 5.0, which got rid of a number of commands, like {{tt|<nowiki><applet>, <basefont>, <center>, <dir>, <font>, <isindex>, <menu>, <strike>, <u></nowiki>}}.  By keeping HTML usage to templates, cleanup after an upgrade like this is made much easier. Even seemingly minimal usage of HTML, such as with tags like <pre><b> and <i></pre> makes it very difficult for bots to maintain the wiki, because raw HTML is simply not expected.  Likewise, the use of <pre><ul> and <li></pre> can interfere with the coding of some templates.  [http://www.codehelp.co.uk/html/deprecated.html Here's a site] that explains this issue in greater detail.
* HTML standards are always in a state of development.  HTML commands are occasionally retired, rendering them useless on pages.  In mid-2012, for instance, Wikia upgraded to HTML 5.0, which got rid of a number of commands, like {{tt|<nowiki><applet>, <basefont>, <center>, <dir>, <font>, <isindex>, <menu>, <strike>, <u></nowiki>}}.  By keeping HTML usage to templates, cleanup after an upgrade like this is made much easier. [http://www.codehelp.co.uk/html/deprecated.html Here's a site] that explains this issue in greater detail.


Therefore, '''only [[Help:wiki markup|Wiki coding]]''' should be used on normal article pages.
Therefore, '''only [[Help:wiki markup|Wiki coding]]''' should be used on normal article pages.
==Exceptions==
The main exceptions to this ruling are the {{tt|<nowiki><ref></nowiki>}} and {{tt|<nowiki><poem></nowiki>}} tags.  Even so {{tlx|reflist}} is much preferred over {{tt|<nowiki><references /></nowiki>}}.

Latest revision as of 07:49, 15 March 2013

Book.png
Avoid HTML
Avoid using HTML in the main namespace. It complicates site maintenance, and creates design inconsistencies. The best place to use HTML is in templates.

If you want to do "fancy formatting", please do it in a template, and them place the template in the main namespace. HTML — which is to say commands like <div>, <span>, <big> — should be avoided in the main namespace.

HTML should be confined to the template namespace as much as is possible. There are a few great reasons for this:

  • If you build tables like infoboxes and navigation templates with HTML directly on regular article pages, you make it impossible to update the look of the table except by directly editing that particular page. The advantage of templates is that they allow you to make edits to the single template page which are then seen on all the pages that share the template.
  • Templates are much easier for maintenance bots to deal with than HTML statements.
  • HTML standards are always in a state of development. HTML commands are occasionally retired, rendering them useless on pages. In mid-2012, for instance, Wikia upgraded to HTML 5.0, which got rid of a number of commands, like <applet>, <basefont>, <center>, <dir>, <font>, <isindex>, <menu>, <strike>, <u>. By keeping HTML usage to templates, cleanup after an upgrade like this is made much easier. Here's a site that explains this issue in greater detail.

Therefore, only Wiki coding should be used on normal article pages.

Exceptions

The main exceptions to this ruling are the <ref> and <poem> tags. Even so {{reflist}} is much preferred over <references />.