TechSmart

Think Technology Think Smart

Breaking

Tuesday, May 26, 2020

What is HTML 5 ?

     Hii there ! its Akash, in this post we are going to learn HTML 5 and its basic structure,  and more.

HTML 5  :-


  • HTML5 is a descendant from HTML, though it has major similarities with some added features and more tags and simplified coding (better for programmers/web developers).
Key Differences
  • Audio and video were not part of previous HTML version specifications; however, both are the integral part of HTML5 specifications.
  • Vector graphics is also an integral part of HTML5 such as SVG and canvas while vector graphics is possible in HTML with the help of various technologies such as VML, Silver-light, Flash, etc.
  • In HTML, browser cache can be used as temporary storage. In case of HTML5, application cache, web SQL database, and web storage is used.
  • HTML doesn't allow JavaScript to run in web browser, it runs in same thread as browser interface. HTML5 allows JavaScript to run in background that is possible because of JS Web worker API in HTML5.
  • HTML works smoothly with all old browsers while most of the modern web browsers have started supporting HTML5 specifications.
  • These browsers include: Firefox, Mozilla, Chrome, Opera, Safari, etc.
  • The aim of HTML5 is to improve the language by support of latest multimedia while keeping it user friendly and easily readable by humans and consistently understood by computers and devices such as web browsers parser, etc.
  • Various other tags are added in HTML5 to enhance the web development and user interaction.

1. HTML 5 Basic Structure

<!DOCTYPE html> 
<html>
 <head>
<meta charset="UTF-8">
 <title>Title of an HTML page </title>
 </head>
<body> 
Contents of the page
</body>
</html>
     In HTML5, the differences is <!DOCTYPE> and <meta charset > declaration.

2. DOCTYPE declaration.



  • The <DOCTYPE> declaration is not an HTML tag. It gives information to the web browser about the version of an HTML pages.
  • A document type declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document (for example, a web-page) with a document type definition (DTD) for example , the formal definition of a particular version of HTML 1.0 - HTML 4.0).
  • In earlier version of HTML5 i.e. HTML 4.01, the <!DOCTYPE> declaration refers to a DTD(Document Type Definition), because HTML 4.01 was based on SGML.
  • The DTD specifies set of rules for the markup language, so that the web browsers render and interpret the content/information correctly.
  • Since, HTML5 is not based on SGML; it does not require a reference to a DTD (Document Type Definition).

3. <Meta charset>



  • It is divided in two parts <meta> which is a tag and "charset is an attribute of the tag. (We will discuss "attribute" in detail later ahead while learning more tags).
  • <meta> comes from Metadata. Metadata is data (information) about data. i.e. metadata gives the information about the properties of the data or any document, or a file.
  • For example pick up any file in your PC and right click on it and click on the properties tab; what you see is the information about that particular file, i.e file size, author, time created and so further.
  • This is the information about the file or in other words it is the Metadata of that file. The <meta> tag provides metadata about the HTML document; means information about that file."charset" attribute (or character encoding); specifies the character set encoding standard, that specifies the encoding within the first 512 bytes of the HTML5 document.
  • A character encoding tells the computer how to interpret raw O's and l's into• real characters. It usually does this by pairing numbers with characters. There are many different types of coding character sets or encoding standards, one of them is "UTF-8". (i.e.: Unicode Transformation Format - 8 bits),

5. Encoding



  • In the beginning, there was ASCII, and things were simple. But they weren't good, for no one could write in Cyrillic or Thai.
  • So there exploded a proliferation of character encoding s to remedy the problem by extending the characters ASCII could express.
  • This ridiculously simplified version of the history of character e shows us that there are now many character encoding floating around.
  • A character encoding tells the computer how to interpret raw zeros and ones into real characters. It usually does this by pairing numbers with  characters.
  • There are many different types of character encodings floating around the ones we deal most frequently with are ASCII, 8-bit encoding Unicode-based encodings.
  • ASCII is a 7-bit encoding based on the English alphabet.
  1. 8-bit encodings are extensions to ASCII that add a potpourri useful, non-standard characters like é and æ.
  2. They can only add 127 characters, so usually only support one script at a time.
  3. When you see a page on the web, chances are it's encoded in these encodings.
  4. Unicode-based encodings implement the Unicode standard include UTF-8, UTF-16 and UTF-32/UCS-4.
  5. They go beyond 8-bits and support almost every language in the world.
  6.  UTF-8 is gaining traction as the dominant international encode the web.
  • The first step of our journey is to find out what the encoding of your we is. The most reliable way is to ask your browser:
Ref: http://techsmart02.org/docs/enduser-utf8.html)
Note: <meta charset = "UTF-8"> syntax replaces the need for <meta http-equive="content type" content="text/html; charset=UTF-8"> (which was used in earlier versions of HTML), although that syntax is still allowed.

  • This explains the basic difference between HTML and HTML5.
Thank you for visiting my site, have a nice day..

No comments:

Post a Comment