code: function startTagInHead(p, token) {
      const tn = token.tagName;
  
      if (tn === $.HTML) {
          startTagInBody(p, token);
      } else if (tn === $.BASE || tn === $.BASEFONT || tn === $.BGSOUND || tn === $.LINK || tn === $.META) {
          p._appendElement(token, NS.HTML);
          token.ackSelfClosing = true;
      } else if (tn === $.TITLE) {
          p._switchToTextParsing(token, Tokenizer.MODE.RCDATA);
      } else if (tn === $.NOSCRIPT) {
          if (p.options.scriptingEnabled) {
              p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);
          } else {
              p._insertElement(token, NS.HTML);
              p.insertionMode = IN_HEAD_NO_SCRIPT_MODE;
          }
      } else if (tn === $.NOFRAMES || tn === $.STYLE) {
          p._switchToTextParsing(token, Tokenizer.MODE.RAWTEXT);
      } else if (tn === $.SCRIPT) {
          p._switchToTextParsing(token, Tokenizer.MODE.SCRIPT_DATA);
      } else if (tn === $.TEMPLATE) {
          p._insertTemplate(token, NS.HTML);
          p.activeFormattingElements.insertMarker();
          p.framesetOk = false;
          p.insertionMode = IN_TEMPLATE_MODE;
          p._pushTmplInsertionMode(IN_TEMPLATE_MODE);
      } else if (tn === $.HEAD) {
          p._err(ERR.misplacedStartTagForHeadElement);
      } else {
          tokenInHead(p, token);
      }
  }
docs: The "in head" insertion mode ------------------------------------------------------------------