Skip to content

Commit

Permalink
Added an example for constructing <dl></dl> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bharadwajyarlagadda committed Sep 2, 2016
1 parent c976bc8 commit da65108
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -500,3 +500,25 @@ Korona supports ``align`` attribute for ``<div>`` tag. Korona can help you build
assert div_tag1 == '<div align="left" >abcd</div>
assert div_tag1 == dialog_tag2
<dd>
----

Korona can build <dl> tag.

.. code-block:: python
from korona.html.construct import DL
attributes = {'text': 'abc'}
# You can pass in the attributes in the form of a dictionary.
dl1 = DL(**attributes)
# You can also pass in the attributes as args.
dl2 = DL(text='abc')
dl_tag1 = dl1.construct()
dl_tag2 = dl2.construct()
assert dl_tag1 == '<dl>abc</dl>'
assert dl_tag1 == dl_tag2

0 comments on commit da65108

Please sign in to comment.