Concepts of HTML

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

  1. HTML Markup tags are also called HTML Tags.
  2. They come in pairs for instance-: <b> </b>
  3. The first tag is called the Start tag and the second tag is called the End Tag.
  4. Some tags do not require the closing tags called Empty Tags.

Graphical Structure of HTML Document

  1. <html>  
  2.     <body>  
  3.         <h1>  
  4.         This a heading</h1>  
  5.         <p> 
  6.         This is a paragraph.</p>  
  7.         <p>  
  8.         This is another paragraph.</p>  
  9.     </body>  
  10. </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!!

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  
  2. "http://www.w3.org/TR/html4/strict.dtd">  
  3. <html>  
  4.     <head>  
  5.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
  6.             <title>Hello HTML 4 World</title>  
  7.         </head>  
  8.         <body>  
  9.             <h1>  
  10.         Welcome to the World of HTML</h1>  
  11.             <hr>  
  12.                 <p>  
  13.         HTML   
  14.                     <em>really</em> isn't so hard!  
  15.                 </p>  
  16.                 <p>  
  17.         Soon you will ♥ using HTML.</p>  
  18.                 <p>  
  19.         You can put lots of text here if you want.</p>  
  20.             </body>  
  21.         </html> 
  1. <!DOCTYPE> statement, which indicates the particular version of HTML or XHTML is used in the document.
  2. The <html>, <head>, and <body> tag pairs are used to specify the general structure of the document.
  3. The <meta> tag used in the examples indicates the MIME type of the document and the character set in use.
  4. The <title> and </title> tag pair specifies the title of the document, which generally appears in the title bar of the Web browser.
  5. A comment is specified by <!-- -->, allowing page authors to provide notes for future reference.
  6. The <h1> and </h1> header tag pair indicates a headline specifying some important information.
  7. The <hr> tag, which has a self-identifying end tag (<hr />) under XHTML, inserts a horizontal rule, or bar, across the screen.
  8. The <p> and </p> paragraph tag pair indicates a paragraph of text.
  9. A special character is inserted using a named entity (&hearts;), which in this case inserts a heart dingbat character in the text.
  10. 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
  1. <!ELEMENT P - O (%inline;)* -- paragraph -->  
  2. <!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
  1. New features should be based on HTML, CSS, DOM, and JavaScript
  2. Reduce the need for external plugins (like Flash)
  3. Better error handling
  4. More markup to replace scripting
  5. HTML5 should be device-independent
  6. The development process should be visible to the public.
In HTML5 there is only one <!doctype> declaration, and it is very simple:
  1. <! DOCTYPE html>  
  2. Hello HTML5 The syntax of HTML5- HTML5 document looks like this:  
  3. <!DOCTYPE html>  
  4. <html>  
  5.     <head>  
  6.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
  7.             <title>Hello HTML5 World</title>  
  8.         </head>  
  9.         <body>  
  10.             <h1>  
  11.         Hello HTML5</h1>  
  12.             <p>  
  13.         Welcome to the future of markup!</p>  
  14.         </body>  
  15.     </html>