Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
Type attribute in html5 in Trick and Tips of HTML5 & CSS3 Examples
2700 Views
Type Attribute 
In Html 4.0 version and below when write the script tag or style tag we used to include "type" attribute to explain , which type of script it has whether java script or VB script. But now a days we are using java script and css only.So that, In both tags no need to mention type attribute.
Html 4.0
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <title>Title of document</title>
        <script type="text/javascript" src="http://link" />
        <style type="text/css">
            p{
             color:red}
        </script>
    </head>
    <body>
        <p>Content</p>
    </body>
</html>
Html5
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
        <title>Title of document</title>
        <script src="http://link" />
        <style>
            p{
             color:red}
        </script>
    </head>
    <body>
        <p>Content</p>
    </body>
</html>
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details