Search code examples
htmlpython-3.xyattag

How do you add a line break in yattag?


When generating an HTML document in yattag, how do you add a line break (<br/>)?


Solution

  • You could use doc.stag('br') since the stag method produces a self closing tag. You'll get <br />