T
T
Turar Abu2015-10-05 21:00:49
HTML
Turar Abu, 2015-10-05 21:00:49

Why specify type?

In HTML5 I write tags with <script>or <link>without the type attribute and everything works fine. But when you look at the code of other sites, these attributes are everywhere.
Question: Why is this attribute needed and what will happen if it is not written?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maddog670, 2015-10-05
@kemply

For HTML4.01, this is a required attribute. Not for HTML5. And type can contain not only text / javascript, but also text / vbscript, for example

Z
zooks, 2015-10-05
@zooks

That's right, the type attribute for script and link tags is now (in HTML5) deprecated.
All sites must migrate to HTML5.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question