All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

Javascript CSS

With the help of Javascript you can add, delete and change the styling of an HTML elements.


Syntax


document.getElementById(id).style.property=new style;

Example of Javascript CSS

<html>
<head>

<script>
document.getElementById("link1").style.color = "red";
</script>

</head>

<body>

<a href="#">This is a Link</a>

</body>
</html>
❮ PreviousNext ❯