in reply to Re^3: RFC: Proofread the POD for my HTML elements module
in thread RFC: Proofread the POD for my HTML elements module

I adapted your example for my needs ;-)...

#!/usr/bin/env perl use strict; use warnings; use HTML::HTML5::Builder qw[:standard]; my @things = ( "Sex", "Drugs", "Rock and Roll", "Charlie Haden", ); print html( -lang => 'en', head( title('My Favorite Things'), Meta( -charset=> 'utf-8' ), ), body( h1('Testomato'), p('My Favorite Things...'), ul( map li($_), @things ), ), ); __END__

...and get:

karls-mac-mini:monks karl$ ./html5.pl <!DOCTYPE html> <html lang=en> <title>My Favorite Things</title> <meta charset=utf-8> <h1>Testomato</h1> <p>My Favorite Things... <ul> <li>Sex <li>Drugs <li>Rock and Roll <li>Charlie Haden </ul>

Ooops! Omitting end tags needs getting used to (was so in HTML 3.2) but the missing body tag is a big surprise as i requested it with body(# stuff).

And this validator tells me that the generated html is valid.

I found in a hurry Is it necessary to write HEAD, BODY and HTML tags? Ok, i wasn't aware of this.

It is like it is. Or is there any chance/way that i can get a body tag?

It's just because i'm inured to have it ;-) And in my opinion the generated html looks really strange without it.

Update: Yes sure - DOM Tree view in Safari gives me what i want...

<!DOCTYPE html> <html lang="en"> <head> <title>My Favorite Things</title> <meta charset="utf-8"> </head> <body> <h1>Testomato</h1> <p>My Favorite Things...</p> <ul> <li>Sex</li> <li>Drugs</li> <li>Rock and Roll</li> <li>Charlie Haden</li> </ul> </body> </html>

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»