" and the syntax for external scripts is "

How to use js in html5?

青灯夜游
Release: 2020-09-08 16:06:31
Original
6139 people have browsed it

In HTML5, you can embed JavaScript code directly in the page and include external JavaScript files. The syntax for embedded scripts is "", and the syntax for external scripts It is "".

How to use js in html5?

In HTML5, js code can be used in two ways (embedded script and external script) through the tags.

Description:MIME type includes two parts: media type and subtype. For JavaScript, the MIME type is "text/javascript".

Note:In HTML5, the type attribute is no longer required. The default value is "text/javascript". JavaScript is the default scripting language in HTML5 and all modern browsers.

Recommended video tutorials: "

HTML5 Tutorial", "JavaScript Tutorial"

##

The above is the detailed content of How to use js in html5?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!