Link & Script Tags


  • The <link> and <script> tags are essential elements within an HTML document's <head> section. 
  • They serve various purposes, like linking external stylesheets or including JavaScript files.

<link> Tag

  • The <link> tag is commonly used to link external stylesheets to an HTML document. It's a self-closing tag, meaning it doesn't require a closing tag.


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

<script> Tag

  • The <script> tag is used to include JavaScript code or files in an HTML document. Unlike the <link> tag, the <script> tag must be closed with a </script> tag.

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


Related Posts:

  • HTML Page Structure Understanding the Structure of an HTML Document <!DOCTYPE html> // let browser know it's an HTML5 Document.<html> // Root of an… Read More
  • Anchor Tag <a> tag defines a hyperlink, which is used to link from one page to another page.Key Characteristics of HTML Anchor LinksSpecified by the … Read More
  • HTML Attributes What is an HTML Attribute?HTML attributes provide additional information about HTML elements. Attributes are always specified in the start … Read More
  • HTML Comments it is used to understand the code written by someone.the browser will ignore the comments Types of Comments in HTMLSingle-line CommentsSing… Read More
  • Paragraph Horizontal and Line Break Tags The <p> tag defines a paragraph.Browsers automatically add a single blank line before and after each.<p>This is a paragraph.</p&g… Read More

0 Comments:

Post a Comment

Do leave your comments