The last part of Html Head Tag we discuss about the head tag and use of style tag and title tag, these tags are used in the Head Tag. In This part of we discuss about the Script Tag and Link Tag. let's starts!
Script Tag | The Script Element |
JavaScript is a programming language and a JavaScript code insert between the script tag. JavaScript is used to perform function in website.
Script tag placed inside the head section and body section of HTML web page. We can insert many numbers of script element in the head & body.
In the html page script tag identifies a block of script code, Java script function can be executed when "called". As the user clicks the button and the function of the button performs its function.
We can include the JavaScript directly in the script tag or we can also add JavaScript via URL in the script tag. JavaScript files saved with the .js file extension.
JavaScript in Head :
- async - value "async"
- defer - value "defer"
- scr - value "URL"
Specifies the URL of external script.
- type - value "scrip type/text/JavaScript application"
specifies the media type of the link document.
Link Tag | The External Resource Link Element |
The Link tag is used for external document and it is insert between head tag. Link tag create the relation between the document and external resource
The Link element is a empty element it does not have closing tag and it contains only attribute.
Link tag are often used to link the external style sheet file to the web page.
Link Tag Syntax :
Here Link tag attribute is rel and href :
- rel - value
It describe the relationship between current document and link document.
- href - value "URL"







Comments
Post a Comment