Introduction of HTML
1. In the case of Web Documents, mark up is in the form of traditional Hyper
Text Markup Language (HTML). HTML is a language for describing web pages. HTML
stands for HyperText Markup Language. HTML is a markup language. A markup language is a set of markup tags. The tags describe document content. HTML
documents contain HTML tags and plain text. HTML documents are also called web
pages.
2. An HTML document is simply a text file that contains the information you want
to publish and the appropriate markup instructions indicating how the browser
should structure or present the document.
3. HTML 1 written by Tim Berners-Lee, the founding father of the Web.
HTML Tags
- HTML Markup tags are also called HTML
Tags.
- They come in pairs for instance-: <b>
</b>
- The first tag is called the Start tag and the second tag is called the End Tag.
- Some tags do not require the closing tags
called Empty Tags.
Graphical Structure of HTML Document
- <html>
- <body>
- <h1>
- This a heading</h1>
- <p>
- This is a paragraph.</p>
- <p>
- This is another paragraph.</p>
- </body>
- </html>
HTML Versions
HTML 1991
HTML+ 1993
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 1.0 2000
HTML5 2012
XHTML5 2013
Hello HTML!!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Hello HTML 4 World</title>
- </head>
- <body>
- <h1>
- Welcome to the World of HTML</h1>
- <hr>
- <p>
- HTML
- <em>really</em> isn't so hard!
- </p>
- <p>
- Soon you will ♥ using HTML.</p>
- <p>
- You can put lots of text here if you want.</p>
- </body>
- </html>
- <!DOCTYPE> statement, which indicates the
particular version of HTML or XHTML is used in the document.
- The <html>, <head>, and <body> tag pairs
are used to specify the general structure of the document.
- The <meta> tag used in the examples
indicates the MIME type of the document and the character set in use.
- The <title> and </title> tag pair
specifies the title of the document, which generally appears in the title
bar of the Web browser.
- A comment is specified by <!-- -->,
allowing page authors to provide notes for future reference.
- The <h1> and </h1> header tag pair
indicates a headline specifying some important information.
- The <hr> tag, which has a
self-identifying end tag (<hr />) under XHTML, inserts a horizontal rule, or
bar, across the screen.
- The <p> and </p> paragraph tag pair
indicates a paragraph of text.
- A special character is inserted using a
named entity (♥), which in this case inserts a heart dingbat
character in the text.
- The <em> and </em> tag pair surrounds a
small piece of text to emphasize which a browser typically renders in italics.
HTML DTD's
All (X) HTML documents should follow a formal structure defined by the World
Wide Web Consortium (W3C; www.w3.org), which is the primary organization that defines Web standards. The W3C defined HTML as an application of the Standard
Generalized Markup Language (SGML).It is a technology used to define markup languages by specifying the allowed document structure in the form of a document type definition (DTD). A DTD indicates the syntax that can be used for the various elements of a language such as HTML.
For Instance
- <!ELEMENT P - O (%inline;)* -- paragraph -->
- <!ATTLIST P %attrs; -- %coreattrs, %i18n, %events -->
A snippet of HTML paragraph in the form of DTD.
Now HTML 5
HTML5 will be the new standard for HTML.The previous version of HTML, HTML 4.01,
came in 1999. The web has changed a lot since then. HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and
APIs. HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the
Web Hypertext Application Technology Working Group (WHATWG). WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006,
they decided to cooperate and create a new version of HTML.
Some rules for HTML5 were established
- New features should be based on HTML, CSS,
DOM, and JavaScript
- Reduce the need for external plugins
(like Flash)
- Better error handling
- More markup to replace scripting
- HTML5 should be device-independent
- The development process should be visible
to the public.
In HTML5 there is only one <!doctype>
declaration, and it is very simple:
- <! DOCTYPE html>
- Hello HTML5 The syntax of HTML5- HTML5 document looks like this:
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Hello HTML5 World</title>
- </head>
- <body>
- <h1>
- Hello HTML5</h1>
- <p>
- Welcome to the future of markup!</p>
- </body>
- </html>