Help:HTML

From Fanlore
(Redirected from W:HTML)
Jump to navigation Jump to search

For accessibility and compatibility reasons, it is generally better to use wiki markup rather than HTML. The following HTML elements are currently permitted:

Presentational markup

The use of presentational markup is discouraged. The equivalent CSS should be used instead.

<b>...</b>
Use boldface type. Equivalent CSS: {font-weight: bold}

<i>...</i>
Use italic type. Equivalent CSS: {font-style: italic}

<big>...</big>
Creates bigger text. Equivalent CSS: {font-size: larger}.

<tt>...</tt>
Use a typewriter-like (fixed-width) font. Equivalent CSS: {font-family: monospace}

<small>...</small>
Creates smaller text. Equivalent CSS: {font-size: smaller}

<!--...-->
Encloses a comment. Generally, the Talk pages should be used instead.

General block elements

<p>...</p>
Creates a paragraph, perhaps the most common block level element. The closing tag is not required in HTML.

<blockquote>...</blockquote>
Contains quoted material when the quotation itself includes block level elements (for instance, quoting several paragraphs). The cite attribute may give the source, and must be a fully qualified Uniform Resource Identifier. The blockquote element is often misunderstood. It is an element meant to contain quotations that are themselves block level. In other words, it contains a complete paragraph or many paragraphs.

<br>
Specifies a line-break. Use the XML compatible <br/> instead.

Headings

<h1>...</h1> <h2>...</h2> <h3>...</h3> <h4>...h4> <h5>...<h5> <h6>...</h6>
Section headings at different levels. Use <h1> for the highest-level heading (the major sections), <h2> for the next level down (sub-section), <h3> for a level below that, and so on. The lowest level heading is <h6>.

Most web browsers will show <h1> as large text in a different font, and <h6> as small bold-faced text, but this can be overridden with CSS. The heading elements are not intended merely for creating large or bold text: they describe something about the document's structure and organization. Some programs use them to generate outlines and tables of contents.

Tables

<table>...<table>
Creates a table. Wikitext markup is preferred -- see Help:Tables.

<tr>...</tr></nowiki>
Creates a row in the table.

<th>...</th></nowiki>
Creates a table header cell within a row; contents are conventionally displayed bold and centered.

<td>...</td>
Creates a table data cell within a row.

<colgroup>...</colgroup>
Specifies a column group in a table.

<caption>...</caption>
Specifies a caption for the entire table.

<thead>...</thead><
Specifies the header part of a table. This section may be repeated by the user agent if the table is split across pages (in printing or other paged media).

<tbody>...</tbody>
Specifies the main part of a table.

<tfoot>...</tfoot>
Specifies the footer part of a table. Like <thead>, this section may be repeated by the user agent if the table is split across pages (in printing or other paged media)

HTML NOT to Use

<center>...</center>

Creates a block-level centered division. May also center-align all text. Deprecated in favor of

or another element with centering defined using CSS.
<u>...</u> 

Use an underlined font. Equivalent CSS: {text-decoration: underline}

<font>...</font>

... For specifiying fonts. Should not be necessary on the Wiki, but if it is, use CSS.

<strike>...</strike> 

Create strike-through text. Equivalent CSS: {text-decoration: line-through}

<img src=dontdothis.jpg>

For displaying images. Images hosted elsewhere cannot display on Fanlore; see Help:Images for how to display images hosted on Fanlore.