Difference between revisions of "HTML"

From Discworld MUD Wiki
Jump to: navigation, search
 
Line 6: Line 6:
 
!Opening Tag
 
!Opening Tag
 
!Closing Tag
 
!Closing Tag
 +
!Type
 
!Use
 
!Use
 
|-
 
|-
 
|<nowiki><b></nowiki>
 
|<nowiki><b></nowiki>
 
|<nowiki></b></nowiki>
 
|<nowiki></b></nowiki>
 +
|in-line
 
|bold text
 
|bold text
 
|-
 
|-
 
|<nowiki><br /></nowiki>
 
|<nowiki><br /></nowiki>
 
|none
 
|none
 +
|in-line
 
|line break
 
|line break
 
|-
 
|-
 
|<nowiki><center></nowiki>
 
|<nowiki><center></nowiki>
 
|<nowiki></center></nowiki>
 
|<nowiki></center></nowiki>
 +
|block
 
|centered text
 
|centered text
 
|-
 
|-
 
|<nowiki><code></nowiki>
 
|<nowiki><code></nowiki>
 
|<nowiki></code></nowiki>
 
|<nowiki></code></nowiki>
 +
|block
 
|code
 
|code
 
|-
 
|-
 
|<nowiki><dd></nowiki>
 
|<nowiki><dd></nowiki>
 
|<nowiki></dd></nowiki>
 
|<nowiki></dd></nowiki>
 +
|block
 
|definition within definition list, follows term to which it applies
 
|definition within definition list, follows term to which it applies
 
|-
 
|-
 
|<nowiki><dl></nowiki>
 
|<nowiki><dl></nowiki>
 
|<nowiki></dl></nowiki>
 
|<nowiki></dl></nowiki>
|definition list
+
|block
 +
|definition list, contains one or more dt + dd element pairs
 
|-
 
|-
 
|<nowiki><dt></nowiki>
 
|<nowiki><dt></nowiki>
 
|<nowiki></dt></nowiki>
 
|<nowiki></dt></nowiki>
 +
|block
 
|term within definition list, precedes relevant definition
 
|term within definition list, precedes relevant definition
 
|-
 
|-
 
|<nowiki><i></nowiki>
 
|<nowiki><i></nowiki>
 
|<nowiki></i></nowiki>
 
|<nowiki></i></nowiki>
 +
|in-line
 
|italic text
 
|italic text
 
|-
 
|-
 
|<nowiki><li></nowiki>
 
|<nowiki><li></nowiki>
 
|<nowiki></li></nowiki>
 
|<nowiki></li></nowiki>
 +
|block
 
|list item within ordered or unordered list
 
|list item within ordered or unordered list
 
|-
 
|-
 
|<nowiki><ol></nowiki>
 
|<nowiki><ol></nowiki>
 
|<nowiki></ol></nowiki>
 
|<nowiki></ol></nowiki>
|ordered list
+
|block
 +
|ordered list, contains one or more li items
 
|-
 
|-
 
|<nowiki><p></nowiki>
 
|<nowiki><p></nowiki>
 
|<nowiki></p></nowiki>
 
|<nowiki></p></nowiki>
 +
|block
 
|paragraph
 
|paragraph
 
|-
 
|-
 
|<nowiki><pre></nowiki>
 
|<nowiki><pre></nowiki>
 
|<nowiki></pre></nowiki>
 
|<nowiki></pre></nowiki>
 +
|block
 
|preformatted text
 
|preformatted text
 
|-
 
|-
 
|<nowiki><ul></nowiki>
 
|<nowiki><ul></nowiki>
 
|<nowiki></ul></nowiki>
 
|<nowiki></ul></nowiki>
|unordered list
+
|block
 +
|unordered list, contains one or more li items
 
|}
 
|}
 +
 +
Every element should be closed within the containing element inside which it was opened. So, for example, a centered paragraph containing bold italic content could be marked up as:
 +
 +
<nowiki><center>
 +
<p><b><i>Content line 1<br />
 +
Content line 2</i></b></p>
 +
</center></nowiki>
 +
 +
but must not be marked up as:
 +
 +
<nowiki><center>
 +
<p><b><i>Content line 1<br />
 +
Content line 2</b></i></p>
 +
</center></nowiki>
 +
 +
as in the latter case, the italic element has not been closed within the bold element within which it was opened.
 +
 +
Block type elements may generally contain other block type elements or in-line type elements. In-line type elements should not contain block type elements, but may contain in-line type elements.
  
 
==External Links==
 
==External Links==
 
* [http://en.wikipedia.org/wiki/HTML Wikipedia: HTML]
 
* [http://en.wikipedia.org/wiki/HTML Wikipedia: HTML]
 
* [http://www.w3schools.com/html/default.asp W3 Schools: HTML Tutorial]
 
* [http://www.w3schools.com/html/default.asp W3 Schools: HTML Tutorial]

Latest revision as of 11:49, 8 July 2012

HTML is an acronym for Hyper-Text Markup Language. It is a markup language used to define the content and layout of webpages, and allows the use of hyperlinks. If you need to know more than this, then you are on the wrong website. If you would like to know more, however, try one of the websites listed below.

Newspaper editing within the Mud uses a limited subset of HTML elements:

Opening Tag Closing Tag Type Use
<b> </b> in-line bold text
<br /> none in-line line break
<center> </center> block centered text
<code> </code> block code
<dd> </dd> block definition within definition list, follows term to which it applies
<dl> </dl> block definition list, contains one or more dt + dd element pairs
<dt> </dt> block term within definition list, precedes relevant definition
<i> </i> in-line italic text
<li> </li> block list item within ordered or unordered list
<ol> </ol> block ordered list, contains one or more li items
<p> </p> block paragraph
<pre> </pre> block preformatted text
<ul> </ul> block unordered list, contains one or more li items

Every element should be closed within the containing element inside which it was opened. So, for example, a centered paragraph containing bold italic content could be marked up as:

<center> <p><b><i>Content line 1<br /> Content line 2</i></b></p> </center>

but must not be marked up as:

<center> <p><b><i>Content line 1<br /> Content line 2</b></i></p> </center>

as in the latter case, the italic element has not been closed within the bold element within which it was opened.

Block type elements may generally contain other block type elements or in-line type elements. In-line type elements should not contain block type elements, but may contain in-line type elements.

External Links