HTML Tags | Adding Scripts in HTML


Adding Scripts in HTML (i.e. JavaScript, Action script and others) requires the use of opening and closing <script> tags. The script is entered between theses tags.

Here is an example:
<script>
//this is just an example for adding scripts
$(document).ready(function(){
$(‘h1’).click(function(){
$(this).addclass(‘.animate’)
});
});
</script>

To included external script files we have to included the ‘src’ attribute in the script tags like so


<script src=http:/faqwebdevelopmenet.js type=”text/javascript”></script>

In the above HTML code the ‘src’ attribute specifies the source location of the script file and type attribute specifies the type of script being used. (Note: in HTML5 you don’t need to specify the type attribute the browsers will automatically understand the type of script).   

Comments

Check out

CSS Sprites | What are They?

Login form | Using CSS3

HTML5 Semantic Tags | What do they mean

Remove Scrollbars from syntaxhighlighter

Adding a button in HTML | styling a button

How CSS3 Works

HTML5 | LocalStorage

Advanced Jquery easing | Demo and Download

How to add Jquery easing effects | Jquery tutorial