Hướng dẫn javascript load css
View Discussion Show Improve Article Save Article View Discussion Improve Article Save Article The CSS file is used to describe how HTML elements will be displayed. There are various ways to add CSS file in the HTML document. JavaScript can also be used to load a CSS file in the HTML document. Approach:
Example 1: This example uses JavaScript to add CSS file in HTML document.
html
javascript
Output:
Example 2: This example uses JavaScript to add CSS file in HTML document.
html
javascript
Output: CSS is the foundation of webpages, is used for webpage development by styling websites and web apps. JavaScript is best known for web page development but it is also used in a variety of non-browser environments.You can learn more about CSS and Javascript from the links given below:
|