#Module for html validation

1 messages · Page 1 of 1 (latest)

wicked aurora
#

Is there module or feature allowing automatic validation of html in astro componnets? Somethig that would error out missing src parameters in <img> tags, unclosed tags etc.

mellow crestBOT
#

Hi @wicked aurora. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the knowledge sources do not mention any built-in Astro module or feature that provides automatic HTML validation for Astro components, such as erroring out on missing src attributes in <img> tags or detecting unclosed tags.

Astro does enforce some requirements for its own components—for example, the <Image /> component requires an alt attribute and will error if it is missing, to ensure accessibility compliance Image missing required "alt" property.. However, for standard HTML tags like <img>, there is no mention of automatic validation for required attributes or general HTML correctness in the provided documentation.

If you need strict HTML validation (e.g., for missing attributes or unclosed tags), you may need to use external tools or linters outside of Astro, as the documentation does not describe such a feature built into Astro itself.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: