Clear all child and set the text of element

var p = new HTMLTag("p")
p.text("Hello World!")
assert p.write_to_string      ==  "<p>Hello World!</p>"

Text is escaped see: core::String::html_escape

Property definitions

html $ HTMLTag :: text
	# Clear all child and set the text of element
	#
	#     var p = new HTMLTag("p")
	#     p.text("Hello World!")
	#     assert p.write_to_string      ==  "<p>Hello World!</p>"
	# Text is escaped see: `core::String::html_escape`
	fun text(txt: String): HTMLTag do

		if isset _children then children.clear
		append(txt)
		return self
	end
lib/html/html.nit:249,2--260,4