HTML
From DocForge
| This page is a stub. It's lacking in details and can use your help. Please contribute your knowledge to this page. |
HTML is an abbreviation for HyperText Markup Language, a document format used to define web pages. HTML is characterized by content surrounded by elements (also called tags) which help describe the content. The HTML is typically rendered within a web browser for display to an end user.
Contents |
[edit] Hello World
A minimalist Hello World example:
<html> <head> <title>Hello World!</title> </head> <body> <p>Hello World!</p> </body> </html>
Every HTML document must contain one top-level html element. Within that, there must be one head element and one body element. The head element must contain one title element. Any other elements within head and body are optional.
[edit] HTML Elements
[edit] Document and Meta
- html
- Defines the enclosing content as being HTML. After document type markup, the html element surrounds the entire contents of the page.
- head
- Defines meta data typically not displayed directly within web pages, but useful to web browsers and crawlers.
- title
- Always within head, defines the title of the page. It's used for display in web browser tabs and title bars. It's also used as a link title by most search engines.
[edit] Body
- body
- Defines the main content of the web page. The content within the body tag defines what's displayed within the main window of the web browser.
- button
- Defines a button within a form. Buttons can be used for submitting the form, resetting the values, or be tied to a JavaScript action.
- a
- Defines an anchor, typically a link to another document.
- form
- Defines a set of input elements used to submit data to a web server.
- input
- Defines a data input field within a form.
- li
- Line items within an ordered or unordered list (ol or ul)
- ol
- Designates an unordered list. The li elements within are typically rendered with numbers on their left.
- p
- Defines a paragraph.
- ul
- Designates an unordered list. The li elements within are typically rendered with bullets, as opposed to an ordered list (ol) which are rendered with numbers.

