You can pass a MIME type as the second argument to show. By default it’s text/plain i.e. plaintext, so your method above applies to plaintext console output. You can write a method for the text/html MIME type separately, like:
Base.show(io::IO, ::MIME"text/html", res::ChargerResult) = begin
println("<br> <strong>Charger log(s):</strong> <br>", NORMAL)
for i in 1:length(res.frequency)
if res.frequency[i] == 0
println(io, "<span style=\"color: #270\">Message: \"$(res.search_strings[i])\" not found!</span>")
else
println(io, "<span style=\"color: #D8000C\">Message: \"$(res.search_strings[i])\" found $(res.frequency[i]) times!</span>")
end
end
end
(Untested, and sort of a direct translation of the commandline output version - you might want fancier/more idiomatic HTML in the actual code.)