Does html5 css require js?

藏色散人
Release: 2022-12-30 11:11:23
Original
2306 people have browsed it

html5 css requires js; because the HTML page is a skeleton composed of multiple tags, HTML5 has more new tags, and at the same time removes tags that were previously difficult to use; CSS is the skin of the web page. CSS3 is a more beautiful skin; JavaScript controls the behavior of the page.

Does html5 css require js?

The operating environment of this tutorial: windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Recommended: javascript basic tutorial

html5 Do you need js to make a website with css?

Requires javascript. An HTML page is a skeleton composed of various tags. HTML5 has more new tags and removes tags that were previously difficult to use. CSS is the skin of the web page. CSS3 is a more beautiful skin. JavaScript controls page behavior.

Why does HTML5 require JavaScript?

HTML5 has added the following features:

canvas canvas

Geolocation

localStorage, sessionStorage local storage

Wait

These new features all need to be operated by JavaScript. For example, to use the canvas, you need to use the following js

<script>
    var c=document.getElementById("myCanvas");
    var cxt=c.getContext("2d");
    cxt.fillStyle="#FF0000";
    cxt.fillRect(0,0,150,75);
</script>
Copy after login

To use local storage, you need to use the following js

<script>
    localStorage.lastname="Smith";
</script>
Copy after login

As you can see, without js, html5 cannot use new features!

The above is the detailed content of Does html5 css require js?. 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
Popular Tutorials
More>
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!