Get html with HTML DSL

Report a typo

You want to get the following HTML code with HTML DSL:

<h1>Hello, Mike!</h1>

You decided to do it in the following way:

val myDocument = document { }
myDocument.append {
    h1 {
        +"Hello, Mike!"
    }
}
println(myDocument.serialize())

What HTML code will you see in the console?

Open the IDE and check the result yourself.

Enter a short text
___

Create a free account to access the full topic