HTML: Difference between revisions
imported>Pat Palmer No edit summary |
mNo edit summary |
||
(29 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
{{subpages}} | |||
'''HyperText Markup Language''' ('''HTML''') is a set of tags for marking up the content of a [[web page]] into distinct sections. Web pages are an network-based implementation of [[hypertext]], or documents that have dynamic links to one another, rather than being in the sequential form of the pages of a book. | |||
[[Tim Berners-Lee]] created the original HTML (and many associated protocols such as [[HTTP]]) on a [[NeXTcube]] workstation using the [[NeXTSTEP]] development environment. | As of 2014, newer parts of the internet are using HTML version 5. For use with [[JavaScript]] and [[Ajax]], some websites use an older and more restrictive variety of HTML, called XHTML (Extensible HyperText Markup Language), which guarantees a higher conformity with rules so that, among other reasons, XHTML can be manipulated more successfully by JavaScript. Many parts of the web also use an informal mix of the different HTML versions, and web browsers are designed to be able to cope with non-conforming pages. | ||
HTML is a [[World Wide Web Consortium|W3C]] standard used for creating [[World Wide Web]] pages. HTML conforms to, and is a subset of, Standard Generalized Markup Language ([[SGML]]). | |||
HTML resembles old-fashioned typesetting code, or [[PostScript]] printer description language, where a block of text is surrounded by ''tags'' that indicate how it should appear. HTML allows text to be ''linked'' to another file on the [[Internet]], similar to Vannevar Bush's proposed [[Memex|Memory Extender]] (Memex). | |||
[[Tim Berners-Lee]] created the original HTML (and many associated protocols such as [[HTTP]]) on a [[NeXTcube]] workstation using the [[NeXTSTEP]] development environment. He built HTML from prior work on [[markup language]]s and [[hypertext]]. | |||
==Tags== | ==Tags== | ||
Like most markup languages, HTML uses tags to convey information. | Like most markup languages, HTML uses tags to convey information. A typical HTML document has a '''head''' section and a '''body''' section. The head section contains meta-information like the page's title (which appears in a browser window's name), author, encoding, and any stylesheets that should be applied to the document. The head section also contains any script code that has to be loaded before the body section loads. The body section contains the information that makes up the contents of the document. Tags such as '''h1''' and '''h2''' designate article headings, the '''a''' (anchor) tag marks a hyperlink to another document or to another section of the same document, '''em''' and '''strong''' tags are used for emphasis, etc. | ||
Most HTML tags require both an opening and closing tag. Closing tags are similar to opening tags except for a forward slash before the tag designation. However, there are some HTML tags that do not require a closing tag | |||
<br> | |||
HTML can be typed manually in a notepad and saved with a .html extension. It can be opened and viewed using a browser. | |||
Find below a few examples of html tags | |||
{|class = "HTMLTagsTable" border ="1" | |||
|- | |||
!HTML Tag | |||
!Description | |||
|- | |||
|<b><center><html> </html></center></b> | |||
|Indicates beginning and end of HTML document | |||
|- | |||
|<b><center><head> </head></center></b> | |||
|Indicates beginning and end of head section of HTML document | |||
|- | |||
|<b><center><title> </title></center></b> | |||
|Indicates beginning and end of page title, which is visible in the client browser | |||
|- | |||
|<b><center><body> </body></center></b> | |||
|Indicates beginning and end of body of HTML document | |||
|- | |||
|<b><center><center> </center></center></b> | |||
|Indicates beginning and end of centered text | |||
|- | |||
|<b><center><h1> </h1></center></b> | |||
|Indicates beginning and end of heading 1 paragraph format | |||
|- | |||
|<b><center><h2> </h2></center></b> | |||
|Indicates beginning and end of heading 2 paragraph format | |||
|- | |||
|<b><center><b> </b></center></b> | |||
|Indicates beginning and end of bold text | |||
|- | |||
|<b><center><i> </i></center></b> | |||
|Indicates beginning and end of italicized text | |||
|- | |||
|<b><center><br/></center></b> | |||
|Indicates line break. Example of tag that does not have closing tag | |||
|- | |||
|<b><center><font> </font></center></b> | |||
|Used to specify font formatting | |||
|} | |||
==Current Version== | ==Current Version== | ||
The HTML standard is maintained by the [[World Wide Web Consortium]] (commonly shortened to [http://www.w3.org W3C]). The current official version of HTML is [http://www.w3.org/TR/html401/ 4.01] which was ratified in December | The HTML standard is maintained by the [[W3C|World Wide Web Consortium]] (commonly shortened to [http://www.w3.org W3C]). The current official version of HTML is [http://www.w3.org/TR/html401/ 4.01] which was ratified in December 1999. 4.01 is a [[version numbering|minor step]] from 1997's 4.0 standard. | ||
HTML is complemented by [[XHTML|Extensible HyperText Markup Language (XHTML)]], which is a reformulation of HTML using [[XML|Extensible Markup Language (XML)]]. The current version of XHTML is [http://www.w3.org/TR/xhtml11/ XHTML 1.1], which was released in 2001. XHTML is widely used on sites intended for use on mobile devices, where browsers are less forgiving than on computers. The W3C has also combined XHTML 1.1 with a variety of other formats including [[SVG|Scalable Vector Graphics (SVG)]] and [[RDFa]], to allow XHTML users to include elements from these vocabularies - representing vector graphical elements, and [[Semantic Web]] metadata respectively. | |||
==Future of HTML== | |||
The W3C recently reformed the HTML Working Group to work on [[HTML 5]] by formalising the work done by the [[WHAT WG]], an unofficial working group setup by representatives from [[Google]], [[Apple Inc.|Apple]] and [[Opera Software]]. [[HTML 5]] is planned to be the next version of HTML, and will be serialised in both the SGML-derived syntax and as [[XHTML]]. | |||
The W3C also has a Working Group pursuing XHTML 2, but this has had a cold reception from browser vendors and seems unlikely to play an important part in the future of the Web. | |||
==See also== | ==See also== | ||
*[[Body text]] | *[[Body text]] | ||
== Example == | |||
An example of a simple HTML Page: | |||
<pre> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |||
"http://www.w3.or/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||
<head> | |||
<title>Example Page</title> | |||
</head> | |||
<body> | |||
<h1>This is a headline</h1> | |||
<p>This text is part of a paragraph.</p> | |||
</body> | |||
</html></pre> | |||
==External links== | ==External links== | ||
===Tutorials and guides=== | ===Tutorials and guides=== | ||
*[http://www.w3schools.com/html/ W3 School HTML Tutorial] | |||
*[http://www.yourhtmlsource.com/ HTML Source: HTML Tutorials] | *[http://www.yourhtmlsource.com/ HTML Source: HTML Tutorials] | ||
*[http://htmldog.com/ HTML Dog] | *[http://htmldog.com/ HTML Dog] | ||
Line 32: | Line 106: | ||
===Other specifications=== | ===Other specifications=== | ||
*[http://whatwg.org/specs/web-apps/current-work/ Web Applications 1.0] A specification generally referred to as "HTML 5". The Web Hypertext Application Technology working group are an independent initiative who cooperate with the W3C. | *[http://whatwg.org/specs/web-apps/current-work/ Web Applications 1.0] A specification generally referred to as "HTML 5". The Web Hypertext Application Technology working group are an independent initiative who cooperate with the W3C.[[Category:Suggestion Bot Tag]] | ||
[[Category: | |||
Latest revision as of 06:00, 25 August 2024
HyperText Markup Language (HTML) is a set of tags for marking up the content of a web page into distinct sections. Web pages are an network-based implementation of hypertext, or documents that have dynamic links to one another, rather than being in the sequential form of the pages of a book.
As of 2014, newer parts of the internet are using HTML version 5. For use with JavaScript and Ajax, some websites use an older and more restrictive variety of HTML, called XHTML (Extensible HyperText Markup Language), which guarantees a higher conformity with rules so that, among other reasons, XHTML can be manipulated more successfully by JavaScript. Many parts of the web also use an informal mix of the different HTML versions, and web browsers are designed to be able to cope with non-conforming pages.
HTML is a W3C standard used for creating World Wide Web pages. HTML conforms to, and is a subset of, Standard Generalized Markup Language (SGML).
HTML resembles old-fashioned typesetting code, or PostScript printer description language, where a block of text is surrounded by tags that indicate how it should appear. HTML allows text to be linked to another file on the Internet, similar to Vannevar Bush's proposed Memory Extender (Memex).
Tim Berners-Lee created the original HTML (and many associated protocols such as HTTP) on a NeXTcube workstation using the NeXTSTEP development environment. He built HTML from prior work on markup languages and hypertext.
Tags
Like most markup languages, HTML uses tags to convey information. A typical HTML document has a head section and a body section. The head section contains meta-information like the page's title (which appears in a browser window's name), author, encoding, and any stylesheets that should be applied to the document. The head section also contains any script code that has to be loaded before the body section loads. The body section contains the information that makes up the contents of the document. Tags such as h1 and h2 designate article headings, the a (anchor) tag marks a hyperlink to another document or to another section of the same document, em and strong tags are used for emphasis, etc.
Most HTML tags require both an opening and closing tag. Closing tags are similar to opening tags except for a forward slash before the tag designation. However, there are some HTML tags that do not require a closing tag
HTML can be typed manually in a notepad and saved with a .html extension. It can be opened and viewed using a browser.
Find below a few examples of html tags
HTML Tag | Description |
---|---|
Indicates beginning and end of HTML document | |
Indicates beginning and end of head section of HTML document | |
Indicates beginning and end of page title, which is visible in the client browser | |
Indicates beginning and end of body of HTML document | |
Indicates beginning and end of centered text | |
Indicates beginning and end of heading 1 paragraph format | |
Indicates beginning and end of heading 2 paragraph format | |
Indicates beginning and end of bold text | |
Indicates beginning and end of italicized text | |
Indicates line break. Example of tag that does not have closing tag | |
Used to specify font formatting |
Current Version
The HTML standard is maintained by the World Wide Web Consortium (commonly shortened to W3C). The current official version of HTML is 4.01 which was ratified in December 1999. 4.01 is a minor step from 1997's 4.0 standard.
HTML is complemented by Extensible HyperText Markup Language (XHTML), which is a reformulation of HTML using Extensible Markup Language (XML). The current version of XHTML is XHTML 1.1, which was released in 2001. XHTML is widely used on sites intended for use on mobile devices, where browsers are less forgiving than on computers. The W3C has also combined XHTML 1.1 with a variety of other formats including Scalable Vector Graphics (SVG) and RDFa, to allow XHTML users to include elements from these vocabularies - representing vector graphical elements, and Semantic Web metadata respectively.
Future of HTML
The W3C recently reformed the HTML Working Group to work on HTML 5 by formalising the work done by the WHAT WG, an unofficial working group setup by representatives from Google, Apple and Opera Software. HTML 5 is planned to be the next version of HTML, and will be serialised in both the SGML-derived syntax and as XHTML.
The W3C also has a Working Group pursuing XHTML 2, but this has had a cold reception from browser vendors and seems unlikely to play an important part in the future of the Web.
See also
Example
An example of a simple HTML Page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Example Page</title> </head> <body> <h1>This is a headline</h1> <p>This text is part of a paragraph.</p> </body> </html>
External links
Tutorials and guides
HTML Markup Validators
- W3C's Markup Validator
- WDG HTML Validator
- Validators and checkers (Site Check)
- Off-line HTML Validator v1.0 for Windows
Other specifications
- Web Applications 1.0 A specification generally referred to as "HTML 5". The Web Hypertext Application Technology working group are an independent initiative who cooperate with the W3C.