// if block exists: put tag after // if not: add tag in front of the whole HTML sS hAddToHead(S html, S tag) { L tok = htmlTok(html); L head = first(findContainerTag(tok, "head")); if (head == null) ret tag + html; head.set(2, addLineBreak(tag) + head.get(2)); ret join(tok); }