Multi-language Syntax Highlighter Demo
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Syntax demo</title>
<style>
/* This is a CSS comment */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<h1>Hello, world!</h1>
</body>
<script>
console.log("Hello");
</script>
</html>
CSS
/* This is a CSS comment */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
.greeting {
color: #333;
font-size: 18px;
& .demo {
color: red;
}
}
@import url(others/icon/icon.css);
@media (min-width: 576px) {
body {
color: red;
}
}
@keyframes mymove {
from {top: 0px;}
to {top: 200px;}
}
JavaScript
/* This is a comment */
function greet(name) {
// This is a comment
console.log("Hello, " + name + "!");
}
greet("World");
export default new CodeHighlighter(1);
const hello = document.getElementById('test');
//comment
layx install