var img = new HTMLTag("img")
img.attr("src", "./image.png").attr("alt", "image")
assert img.write_to_string == """<img src="./image.png" alt="image"/>"""
# Set a 'value' for 'key'
#
# var img = new HTMLTag("img")
# img.attr("src", "./image.png").attr("alt", "image")
# assert img.write_to_string == """<img src="./image.png" alt="image"/>"""
fun attr(key: String, value: String): HTMLTag do
attrs[key] = value
return self
end
lib/html/html.nit:143,2--151,4