1HTML::Lint::HTML4(3) User Contributed Perl Documentation HTML::Lint::HTML4(3)
2
3
4
6 HTML::Lint::HTML4 -- Rules for HTML 4 as used by HTML::Lint.
7
9 Collection of tags and attributes for use by HTML::Lint. You can add
10 your own tags and attributes if you like.
11
12 # Add an attribute that your company uses.
13 HTML::Lint::HTML4::add_attribute( 'body', 'proprietary-attribute' );
14
15 # Add the HTML 5 <canvas> tag.
16 HTML::Lint::HTML4::add_tag( 'canvas' );
17 HTML::Lint::HTML4::add_attribute( 'canvas', $_ ) for qw( height width );
18
19 This must be done before HTML::Lint does any validation. Note also
20 that this modifies a global table, and is not on a per-object basis.
21
23 The functions below are very specifically not exported, and need to be
24 called with a complete package reference, so as to remind the
25 programmer that she is monkeying with the entire package.
26
27 add_tag( $tag );
28 Adds a tag to the list of tags that HTML::Lint knows about. If you
29 specify a tag that HTML::Lint already knows about, then nothing is
30 changed.
31
32 HTML::Lint::HTML4::add_tag( 'canvas' );
33
34 add_attribute( $tag, $attribute );
35 Adds an attribute to a tag that HTML::Lint knows about. The tag must
36 already be known to HTML::Lint or else this function will die.
37
38 HTML::Lint::HTML4::add_attribute( 'canvas', $_ ) for qw( height width );
39
41 Andy Lester "andy at petdance.com"
42
44 Copyright 2005-2018 Andy Lester.
45
46 This program is free software; you can redistribute it and/or modify it
47 under the terms of the Artistic License v2.0.
48
49 http://www.opensource.org/licenses/Artistic-2.0
50
51 Please note that these modules are not products of or supported by the
52 employers of the various contributors to the code.
53
54
55
56perl v5.36.0 2022-07-22 HTML::Lint::HTML4(3)