Home > Article > Web Front-end > Does html5 css require js?
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.
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>
To use local storage, you need to use the following js
<script> localStorage.lastname="Smith"; </script>
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!