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:

  • Video & Audio Tags<video> TagThe <video> HTML element embeds a media player that supports video playback into the document.The <video> tag create… Read More
  • INLINE ELEMENTS Inline Elements don't start on a new line. It only takes the width required to cover the content.HTML elements are generally divided into two ca… Read More
  • More on Tables Adding a CaptionTo add a title to your table, you can use the <caption> element. This element helps both in terms of SEO and acc… Read More
  • block level element What are Block-level Elements?Block-level elements are those that start on a new line and take up the entire width of their container by default… Read More
  • iFrames in HTMLWhat is an iFrame?An iFrame is an HTML element that enables an inline frame for the embedding of external content. Essentially, you can load another w… Read More

0 Comments:

Post a Comment

Do leave your comments