HTML 5 Syntax

In HTML 5 syntax has changed from HTML like:


  • <!DOCTYPE> : In HTML <!DOCTYPE> has many attributes but in HTML 5 only one attribute.
  • <!DOCTYPE>HTML coding
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <!DOCTYPE>HTML 5 makes web developer life easy.
    <!DOCTYPE html>

  • <header> :
    HTML root Tag in HTML
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    HTML root Tag in HTML 5
    <html lang="en"">

    <Meta> Tag in HTML
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <Meta> Tag in HTML 5
    <meta charset="UTF-8">

    Java Script Tag in HTML
    <script type="text/javascript" src="jquery.js"></script>
    Java Script Tag in HTML 5
    <script src="jquery.js"></script>

    <link> Tag in HTML:
    <link rel="stylesheet" type="text/css" href="stylefile.css">
    <link> Tag in HTML:
    <link rel="stylesheet" href="stylefile.css">

HTML tags remove from HTML5

HTML 5 has most like HTML tags and obviously remove some tags of HTML like:

  • <acronym>
  • <applet>
  • <basefont>
  • <big>
  • <center>
  • <dir>
  • <font>
  • <frame>
  • <frameset>
  • <noframes>
  • <strike>
  • <tt>