div
[div, (style), (class), (id), (onclick), (dataid), (events), (data)]…[divend]
with keys
[div, (style=, class=, id=, onclick, dataid, events, data)]…[divend]
Create a div with css-styles, class, id.
Parameters
style - optional css-styles formatting
class - optional class name
id - optional id attribute
onclick - optional click handler
dataid - optional data-id attribute
events - optional event handlers
data - optional data- attributes
See Also
css-stylessystem/classes[html]Changes
1.37 - accepts key=value pairs as parameters
Examples
Example#1 create an outlined div
[div, position:relative; width:50%; border:1px dotted #000000; text-align:center; padding:5%;]text here[divend]
Output:
Example#2 create div with the Heading class but lowercase
[div,text-transform: lowercase;,Heading]text here[divend]
Output:
Example#3 create div with an onclick handler
[div,style=text-transform: lowercase;,class=Heading,onclick=this.innerHTML='clicked';]click me[divend]
Output:
Example#4 create div with onmouse… handlers
[div,style=text-transform: lowercase;,class=Heading,events=onmouseover=this.style.backgroundColor='#ff0000'; onmouseout=this.style.backgroundColor='';]mouse here[divend]
Output:
Notes