1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
import sys, os
sys.path.append(os.path.join(os.getcwd(),'../'))
from HTMLTags import *
# a few tests
# create 3 cells for a table
cells = TD("bla",Class="even") + TD("bli", Class="odd") + TD("blo",Class="even")
# the row holding these cells
row = TR(cells + TD(' ')*2)
print B(I(FONT("ggg",face="courier")))
print OPTION('blabla',SELECTED=True,value=5)
print HTML(
HEAD('blabla') +
BODY(
A("link",href="http://jjj") +
SELECT(Sum([ OPTION(i,value=i) for i in range(10) ]), name="foo") +
TABLE(row)+TEXT('blabla')+BR())
)
print Sum( [ TD(i) for i in range(5) ])
print Sum ([ TR(TD(i)+TD(i*i)) for i in range(10) ])
stylesheet = LINK(rel="Stylesheet",href="doc.css")
head= HEAD(TITLE('Record collection')+stylesheet)
title = H1('My record collection')
rows = Sum ([TR(TD(t,Class="title")+TD(a,Class="Artist"))
for a,t in [('You are the quarry','Morrissey'),('Buzzcocks','Love bites')] ])
table = TABLE(TR(TH('Title')+TH('Artist')) + rows)
print HTML(head + BODY(title + table))
print OPTION('blabla',SELECTED=False,value=5)
|