Home  >  Article  >  Web Front-end  >  Does html5 css require js?

Does html5 css require js?

藏色散人
藏色散人Original
2021-01-11 09:09:132312browse

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>

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!

Statement:
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