Home / Articles / Programming languages / Markup languages / HTML & CSS / HTML5: optimization of <link> and <script>

HTML5: optimization of <link> and <script>

HTML5: optimization of <link> and <script>
 
Authors: Daisy Smith
HTML5: optimization of <link> and <script>
  • Currently 4 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4/5 (3 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


If you want to connect JavaScript to your page and add links to external CSS files - connect elements link and script, but avoid using the attribute type. In HTML5, you shouldn't use it. Your code should look like this:

<link rel="stylesheet" href="styles.css" />
<script src="scripts.js"></script>

Unlike other versions of HTML, in HTML5 you need to input only short information requited by the browser. The attribute type was officially recognized as redundant. But the old documents in which it is used are valid.


 

Read also

How to create a link in HTML

How to create a link in HTML

Parameter target in HTML

Parameter target in HTML

Image as a link in HTML

Image as a link in HTML

Post comment

basicuse.net
html5_css
106160485398655174790

Quick navigation

General navigation