|
|
Include Javascript and CSS file in html page - HTML
|
Views : 770
|
|
Tagged in : HTML
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Include Javascript and CSS file in html page
We are including javascript and CSS file in HTML page using the following format:
<script language = javascript src = "src name"></script>
<link REL="StyleSheet" TYPE="text/css" HREF="style.css">
But while validating the page we will receive the following error:
Line 41, Column 47: required attribute "TYPE" not specified
<script language=javascript src="src name"></script>
The attribute given above is required for an element that you've used, but you have omitted it. For instance,
in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute
is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
The proper way to include JS file is:
<script type="text/javascript" src="src name"></script>
<link REL="StyleSheet" TYPE="text/css" HREF="style.css"> |
|
By Sanju, On - 2009-10-01 |
|
|
|