html js and css code example

Example 1: how to give css style in javascript

document.getElementById("myH1").style.color = "red";

Example 2: html css js

<!DOCTYPE html>
<html lang="pt-br" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="stylesheet" type="text/css" href="style.css">
	<title>...</title>
</head>
<body>
	...
<script type="text/javascript" src="script.js"></script>
</body>
</html>

Example 3: css in js

JSS is an authoring tool for CSS which allows you to use JavaScript to describe styles in a declarative, conflict-free and reusable way. It can compile in the browser, server-side or at build time in Node.

JSS is framework agnostic. It consists of multiple packages: the core, plugins, framework integrations and others.