Kotlin HTML
Rendering html in kotlin.
Preview
Input:
html {
lang = "en"
head {
title { +"Kotlin HTML" }
}
body {
p {
+"This is the first line of paragraph."
+"This is the second line of paragraph."
}
a {
href = "https://kotlinlang.org/"
+"Link"
}
}
}
Output:
<html lang="en">
<head>
<title>
Kotlin HTML
</title>
</head>
<body>
<p>
This is the first line of paragraph.
This is the second line of paragraph.
</p>
<a href="https://kotlinlang.org/">
Link
</a>
</body>
</html>