Html


HTML , which stands for Hyper Text Markup Language , is the predominant markup language for web pages. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists etc as well as for links, quotes, and other items. It allows images and objects to be embedded and can be used to create interactive forms. It is written in the form of HTML elements consisting of "tags" surrounded by angle brackets within the web page content. It can include or can load scripts in languages such as JavaScript which affect the behavior of HTML processors like Web browsers; and Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both HTML and CSS standards, encourages the use of CSS over explicit presentational markup.

History

Origins

In 1980, physicist Tim Berners-Lee, who was a contractor at CERN, proposed and prototyped ENQUIRE, a system for CERN researchers to use and share documents. In 1989, Berners-Lee wrote a memo proposing an Internet-based hypertext system. Berners-Lee specified HTML and wrote the browser and server software in the last part of 1990. In that year, Berners-Lee and CERN data systems engineer Robert Cailliau collaborated on a joint request for funding, but the project was not formally adopted by CERN. In his personal notes, from 1990 he lists " some of the many areas in which hypertext is used ", and puts an encyclopedia first.

First specifications

The first publicly available description of HTML was a document called HTML Tags , first mentioned on the Internet by Berners-Lee in late 1991. It describes 20 elements comprising the initial, relatively simple design of HTML. Except for the hyperlink tag, these were strongly influenced by SGMLguid, an in-house SGML based documentation format at CERN. Thirteen of these elements still exist in HTML 4.

HTML is a text and image formatting language used by web browsers to dynamically format web pages. Many of the text elements are found in the 1988 ISO technical report TR 9537 Techniques for using SGML , which in turn covers the features of early text formatting languages such as that used by the RUNOFF command developed in the early 1960s for the CTSS (Compatible Time-Sharing System) operating system: these formatting commands were derived from the commands used by typesetters to manually format documents. However the SGML concept of generalized markup is based on elements (nested annotated ranges with attributes) rather than merely point effects, and also the separation of structure and processing: HTML has been progressively moved in this direction with CSS.

Berners-Lee considered HTML to be an application of SGML, and it was formally defined as such by the Internet Engineering Task Force (IETF) with the mid-1993 publication of the first proposal for an HTML specification: "Hypertext Markup Language (HTML)" Internet-Draft by Berners-Lee and Dan Connolly, which included an SGML Document Type Definition to define the grammar. The draft expired after six months, but was notable for its acknowledgment of the NCSA Mosaic browser's custom tag for embedding in-line images, reflecting the IETF's philosophy of basing standards on successful prototypes. Similarly, Dave Raggett's competing Internet-Draft, "HTML+ (Hypertext Markup Format)", from late 1993, suggested standardizing already-implemented features like tables and fill-out forms.

After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working Group, which in 1995 completed "HTML 2.0", the first HTML specification intended to be treated as a standard against which future implementations should be based. Published as Request for Comments 1866, HTML 2.0 included ideas from the HTML and HTML+ drafts. The 2.0 designation was intended to distinguish the new edition from previous drafts.

Further development under the auspices of the IETF was stalled by competing interests. Since 1996, the HTML specifications have been maintained, with input from commercial software vendors, by the World Wide Web Consortium (W3C). However, in 2000, HTML also became an international standard (ISO/IEC 15445:2000). The last HTML specification published by the W3C is the HTML 4.01 Recommendation, published in late 1999. Its issues and errors were last acknowledged by errata published in 2001.

Version history of the standard

HTML version timeline

HTML draft version timeline

XHTML versions

Main article: XHTML

XHTML is a separate language that began as a reformulation of HTML 4.01 using XML 1.0. It continues to be developed:

  • XHTML 1.0, published January 26, 2000 as a W3C Recommendation, later revised and republished August 1, 2002. It offers the same three variations as HTML 4.0 and 4.01, reformulated in XML, with minor restrictions.
  • XHTML 1.1, published May 31, 2001 as a W3C Recommendation. It is based on XHTML 1.0 Strict, but includes minor changes, can be customized, and is reformulated using modules from Modularization of XHTML, which was published April 10, 2001 as a W3C Recommendation.
  • XHTML 2.0, is still a W3C Working Draft. W3C announched that the XHTML 2 group will stop work by end of 2009. There will be no XHTML 2.0 standard. XHTML 2.0 is incompatible with XHTML 1.x and, therefore, would be more accurate to characterize as an XHTML-inspired new language than an update to XHTML 1.x.
  • XHTML 5, which is an update to XHTML 1.x, is being defined alongside HTML 5 in the HTML 5 draft.

Markup

HTML markup consists of several key components, including elements (and their attributes ), character-based data types , and character references and entity references . Another important component is the document type declaration , which specifies the Document Type Definition. As of HTML 5, no Document Type Definition will need to be specified, and will only determine the layout mode.

The Hello world program, a common computer program employed for comparing programming languages, scripting languages, and markup languages is made of 9 lines of code in HTML, albeit Newlines are optional:

                              
                                <!doctype html>
                              
                              
                                <
                                
                                  html
                                
                                >
                              
                              
                                <
                                
                                  head
                                
                                >
                              
                              
                                <
                                
                                  title
                                
                                >
                              
                              Hello HTML
                              
                                <
                                
                                  /
                                
                                
                                  title
                                
                                >
                              
                              
                                <
                                
                                  /
                                
                                
                                  head
                                
                                >
                              
                              
                                <
                                
                                  body
                                
                                >
                              
                              
                                <
                                
                                  p
                                
                                >
                              
                              Hello World!
                              
                                <
                                
                                  /
                                
                                
                                  p
                                
                                >
                              
                              
                                <
                                
                                  /
                                
                                
                                  body
                                
                                >
                              
                              
                                <
                                
                                  /
                                
                                
                                  html
                                
                                >
                              
                            

This Document Type Declaration is for HTML 5.

If the <!doctype html> declaration is not included, most browsers will render using "quirks mode."

Elements

Main article: HTML element

HTML documents are composed entirely of HTML elements that, in their most general form have three components: a pair of element tags with a "start tag" and "end tag"; some element attributes given to the element within the tags; and finally, all the actual, textual and graphical, information content that will be rendered on the display. An HTML element is everything between and including the tags. A tag is a keyword enclosed in angle brackets.

A common form of an HTML element is:

                              
                                
                                  <tag>
                                  
                                    content to be rendered
                                  
                                  </tag>
                                
                              
                            

The name of the HTML element is also the name of the tag. Note that the end tag's name starts with a slash character, "/".

The most general form of an HTML element is:

                              
                                
                                  <tag attribute1="value1" attribute2="value2">
                                  
                                    content to be rendered
                                  
                                  </tag>
                                
                              
                            

By not assigning attributes most start tags default their attribute values.

There are some basic types of tags: Heading of the HTML:<head>...</head>. Usually the title should be included in the head, for example:

                              
                                <
                                
                                  head
                                
                                >
                              
                              
                                <
                                
                                  title
                                
                                >
                              
                              The title
                              
                                <
                                
                                  /
                                
                                
                                  title
                                
                                >
                              
                              
                                <
                                
                                  /
                                
                                
                                  head
                                
                                >
                              
                            

Paragraph Partition:

                              
                                <
                                
                                  p
                                
                                >
                              
                              Paragraph 1
                              
                                <
                                
                                  /
                                
                                
                                  p
                                
                                >
                              
                              
                                <
                                
                                  p
                                
                                >
                              
                              Paragraph 2
                              
                                <
                                
                                  /
                                
                                
                                  p
                                
                                >
                              
                            

Newline:<br>. The difference between <br> and <p> is that 'br' breaks a line without altering the semantic structure of the page, whereas 'p' sections the page into paragraphs. Here is an example:

                              
                                <
                                
                                  code
                                
                                ><
                                
                                  p
                                
                                >
                              
                              This
                              
                                <
                                
                                  br
                                
                                >
                              
                              is a paragraph
                              
                                <
                                
                                  br
                                
                                >
                              
                              with
                              
                                <
                                
                                  br
                                
                                >
                              
                              line breaks
                              
                                <
                                
                                  /
                                
                                
                                  p
                                
                                ><
                                
                                  /
                                
                                
                                  code
                                
                                >
                              
                            

Annotation:

                              
                                <!--..Explain!..-->
                              
                            

Annotations can help to understand the coding and do not dis


About this entry