HTML 5

64 views
Skip to first unread message

Andrew Lazo

unread,
Apr 19, 2011, 7:24:56 PM4/19/11
to karr...@googlegroups.com
how can I update my HTML tags to include the updated tags for HTML 5?

Running Karrigell 4.1 with python 3.2

Pierre Quentel

unread,
Apr 21, 2011, 3:50:20 PM4/21/11
to karrigell


On 20 avr, 01:24, Andrew Lazo <laz...@gmail.com> wrote:
> how can I update my HTML tags to include the updated tags for HTML 5?
>
> Running Karrigell 4.1 with python 3.2
Hi,

For this you have to edit the module __init__.py in folder HTMLTags of
the Karrigell package

The values to update are _CLOSING_TAGS and _NON_CLOSING_TAGS : remove
unsupported tags and add new ones (for instance here :
http://www.w3schools.com/html5/html5_reference.asp)

You should also update the values _LINE_BREAK_AFTER and _ONE_LINE

If you have a working version please let us know, I will include it in
the package

Cheers,
Pierre

Andrew Lazo

unread,
Apr 21, 2011, 9:41:52 PM4/21/11
to karr...@googlegroups.com
First off, thanks for the reply.

I tried to add 'NAV' to the list but it is not recognized when I call the page. I get:

NameError: global name 'NAV' is not defined

I made sure to save the __init__.py file before I refreshed my browser, I even restarted the server but I still get the above error? so far since I am just using the nav tag I dont need to worry about the '_LINE_BREAK_AFTER' or "_ONE_LINE" functions. Once I get the new nav working I plan on updating the tag list to reflect HTML 5, but one step at a time. 

Thanks again for all the help

Andrew Lazo

unread,
Apr 22, 2011, 4:17:57 AM4/22/11
to karr...@googlegroups.com
Hey Pierre,

I have attached the __init.py__ module with updated HTML 5 tags. I haven't updated '_LINE_BREAK_AFTER' or '_ONE_LINE', but the closing tags and non closing tags functions have been updated. I am still getting the same error described above
__init__.py

Pierre Quentel

unread,
Apr 22, 2011, 5:36:53 AM4/22/11
to karrigell
>  __init__.py
> 14KAfficherTélécharger
Thanks very much Andrew, I will test your version

For the problem you mention : my guess is that you updated the module
in the folder where you unpacked the Karrigell-4.1.zip file, but
didn't re-install the package (python setup.py install), so that the
version of __init__.py in Lib/site-packages/HTMLTags is not updated.
Am I right ?

- Pierre

Andrew Lazo

unread,
Apr 22, 2011, 12:42:24 PM4/22/11
to karr...@googlegroups.com
THAT DID IT, YAY!!!

Thanks Pierre. I'll try to make the changes to 'Line break' and 'One line' today or tomorrow and add the update here. Thank you for such an interesting project :)

Andrew Lazo

unread,
Apr 23, 2011, 1:49:13 PM4/23/11
to karr...@googlegroups.com
Hey Pierre,

I was thinking about a DOCTYPE tag for HTML 5 or maybe having it added by deafult? Also adding ' />' to the empty tags like '<BR />' and '<HR />' but I'm unsure how to go about that :(. I'm still teaching myself Python3

sebastian tobie

unread,
Feb 27, 2014, 3:41:28 PM2/27/14
to karr...@googlegroups.com
normal way will not work.
Example: "<!DOCTYPE html>" + HTML()
produce : <text><!DOCTYPE html><html></html>
this will so not work with mostly browsers
so this will work : return "<!DOCTYPE html>"+ str(HTML())
an other way didn't exists in my opinion

Pinault Nicolas

unread,
Mar 1, 2014, 5:03:17 AM3/1/14
to karr...@googlegroups.com
TAG('<!DOCTYPE HTML>\n') + HTML(head + body)
Reply all
Reply to author
Forward
0 new messages