HTML::...::HTML4(3pm)

πŸ“¦
version 2.32 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– HTML::...::HTML4(3pm) πŸ’–

okay bestie, welcome to the HTML::Lint::HTML4 page from the User Contributed Perl Documentation. this is the vibe: it's the rulebook for HTML 4 that HTML::Lint uses. let's get into it 🫢


✨ NAME ✨

HTML::Lint::HTML4 β€” the rules for HTML 4, exactly as used by HTML::Lint. periodt.


🌸 SYNOPSIS 🌸

so basically it's a whole collection of tags and attributes that HTML::Lint uses. and the slay part? you can add your own tags and attributes if you want. your rules, your world πŸ’…

# Add an attribute that your company uses.
HTML::Lint::HTML4::add_attribute( 'body', 'proprietary-attribute' );

# Add the HTML 5 <canvas> tag.
HTML::Lint::HTML4::add_tag( 'canvas' );
HTML::Lint::HTML4::add_attribute( 'canvas', $_ ) for qw( height width );
⚠️ okay this is the important bit: you have to do this before HTML::Lint does any validation. like, no take-backs. and also β€” heads up β€” this modifies a global table, it is not on a per-object basis. so it's giving main character energy for the entire package, not just your little corner of it 😭

🧚 FUNCTIONS 🧚

these functions are very specifically not exported, so you have to call them with a complete package reference. and honestly? that's on purpose β€” it's there to remind the programmer that she is monkeying with the entire package. respect the power you're holding, queen πŸ‘‘

⭐ add_tag( $tag );

adds a tag to the list of tags that HTML::Lint knows about. and if you specify a tag that HTML::Lint already knows about? nothing changes. no drama, no duplicate, just vibes 🌈

HTML::Lint::HTML4::add_tag( 'canvas' );

πŸ’œ add_attribute( $tag, $attribute );

adds an attribute to a tag that HTML::Lint already knows about. and the tag must already be known to HTML::Lint β€” or else this function will literally die. not metaphorically. it will die πŸ’€

HTML::Lint::HTML4::add_attribute( 'canvas', $_ ) for qw( height width );

πŸŽ€ AUTHOR πŸŽ€

Andy Lester, andy at petdance.com β€” iconic, we stan πŸ’–


Copyright 2005-2018 Andy Lester.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License v2.0.

http://www.opensource.org/licenses/Artistic-2.0

Please note that these modules are not products of or supported by the employers of the various contributors to the code. (fr fr, keep that in mind 🫢)


and that's the whole page bestie!! 🌸 this one shipped as part of perl v5.32.0, dated 2020-12-28, under the name HTML::...::HTML4(3pm). go forth and lint responsibly βœ¨πŸ’…πŸ¦‹