skip to content
Site header image Nerdy Momo Cat

TIL about template tags in HTML


One reason I believe I was having trouble getting pages indexed was due to the DOM size. This assumption is based on two observations: (a) when I had the same site in Quatro, it was much easier to get indexed; and (b) Notion returns a very shell-based HTML to Google's crawler (no images, colors, or icons). Most of my pages are stuck in "Discovered - currently not indexed." While I can't guarantee this will help, one major factor contributing to the large DOM size was the popovers I was creating.

So, I asked Claude and GPT-4, and they told me about the <template> tag. I never knew about it before, but it reduced the DOM size from around 2000 to about 1200 (see here Show information for the linked content ). Not sure if it would make a difference, but a smaller DOM size always helpsShow information for the linked content!

Popovers, both pages and blocks, now use template tags to avoid rendering in the DOM, significantly reducing its size.
Popovers, both pages and blocks, now use template tags to avoid rendering in the DOM, significantly reducing its size.