An alternative to HTML::Tagset

is a popular module on CPAN and has nearly nine thousand descendants in the “River of CPAN”. Unfortunately its last version was in March 2008, nearly ten years ago, so it doesn’t feature the HTML5 tags yet. There has been some discussion on the HTML tag set bug tracker
but so far that has not come to fruition. As an alternative to HTML::Tagset, I made the module HTML::Valid::Tagset
, which incorporates the data tables of the “Tidy HTML5” project

It’s partly based on HTML::Tagset’s interface, so it can substitute for some of that module’s functionality, and it also has specific tag sets for each version of HTML, including HTML5.

Having the Tidy HTML5 data tables means I was also able to add a function

which returns a list of valid attributes for a tag, and

, which returns true or false depending on whether a particular tag can take a particular attribute. This is part of a larger distribution called HTML::Valid, based on the Tidy HTML5 project.

blogs.perl.org责编内容来自 (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » An alternative to HTML::Tagset

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录