What are the header (<head>) section changes in HTML5 ?

 Posted by dhirenkaunar-15094 on 5/7/2012 | Category: HTML 5 Interview questions | Views: 2126 | Points: 40
Answer:

Basically below are the two changes in HTML5 head section "

1) Removed "http-equiv="Content-Type" content="text/html; " attribute if the http-equiv="Content-Type" attributes form the META charset tag .

In Earlier version of HTML : charset meta tag is like given below
<meta http-equiv="Content-Type" content="text/html;  content="text/html; charset=utf-8" />


In HTML5
< meta charset="utf-8" />


2 ) No More Types for Scripts and Links

In Earlier version of HTML:

<link rel="stylesheet" href="~\stylesheet.css" type="text/css" />

< script type="text/javascript" src="~\script.js" />


In Html5 : No need to import type="text/css" in case of CSS and type="text/javascript" in JavaScript

< link rel="stylesheet" href="~\stylesheet.css" / >  

< script src="~\script.js" / >


Asked In: Interviews | Alert Moderator 

Comments or Responses

Login to post response