We have the simple HTML page:
get("/html") {
call.respondHtml(HttpStatusCode.OK) {
head {
link(rel = "stylesheet", href = "/style.css")
}
body {
h1("greetingClass") {
attributes["id"] = "greetingId"
+"Hello user!"
}
}
}
}
This page has an element with the following attributes: class="greetingClass" and id="greetingId"
Styles:
get("/style.css") {
call.respondCss {
rule("#greetingId") {
color = Color("#0000FF")
}
rule(".greetingClass") {
color = Color("#00FF00")
}
}
}
What will the user see in the browser?
1)
2)
3)
4)
5)
Open the IDE and check the result yourself.