ProgrammingWiki
Register
Advertisement
MediaWiki logo
This page has been moved to the Programmer's Wiki.
Please do not make any changes or additions to this page.

Any modifications, if still appropriate, should be made on HTML at the Programmer's Wiki.

HTML, or HyperText Markup Language, consists of a set of tags and attributes used to format a web document. Tags are used for layout, while attributes are typically formatting specifiers. Used in conjunction with CSS, an HTML document can quickly be highly customized and finely structured for many various purposes. XHTML and CSS are both W3C standards supported by all modern browsers: Internet Explorer, FireFox, NetScape, and more (please add to list).

Hello World[]

Here is a minimal "Hello World" document written in HTML:

<html>
  <head>
  </head>
  <body>
    Hello World
  </body>
</html>

The html tag marks the boundaries of the document's contents. All HTML documents contain an html tag, a head tag, and a body tag; the head and body tags mark the head and body sections of the HTML document, respectively. Inside the head are the title, metadata, styles, and scripts. Generally, the head tag contains document information that is not rendered in the page, while the body contains the actual data presentation.

Tag Reference[]

Following is a quick tag reference organized by type and usage.

Headings[]

The h1, h2, h3, h4, h5, and h6 tags are used to specify headings in a document. The h1 tag produces the largest heading, while each successive number is slightly smaller than the previous. Here is a table showing the default heading sizes:

HTML Output

<h1>Hello World</h1>

Hello World

<h2>Hello World</h2>

Hello World

<h3>Hello World</h3>

Hello World

<h4>Hello World</h4>

Hello World

<h5>Hello World</h5>

Hello World

<h6>Hello World</h6>

Hello World

Lists[]

Lists can be ordered or unordered, using the ol and ul tags, respectively. Individual list items are nested inside ol and ul tags using the li tag. Following is a table showing the two lists side-by-side:

HTML Output
<ul>
  <li>Category 1</li>
  <ul>
    <li>Item 1-1</li>
    <li>Item 1-2</li>
    <li>Item 1-3</li>
  </ul>
  <li>Category 2</li>
  <ul>
    <li>Item 2-1</li>
  </ul>
</ul>
  • Category 1
    • Item 1-1
    • Item 1-2
    • Item 1-3
  • Category 2
    • Item 2-1
<ol>
  <li>Category 1</li>
  <ol>
    <li>Item 1-1</li>
    <li>Item 1-2</li>
    <li>Item 1-3</li>
  </ol>
  <li>Category 2</li>
  <ol>
    <li>Item 2-1</li>
  </ol>
</ol>
  1. Category 1
    1. Item 1-1
    2. Item 1-2
    3. Item 1-3
  2. Category 2
    1. Item 2-1
Advertisement