Multi-Line Text With foreignObject and HTMLThis example demonstrates how to use the foreignObject element to display a paragraph of multi-line text with automatic line-wrapping. The foreignObject contains a body tag with an XML namespace (xmlns) to specify XHTML. The body tag contains a p (paragraph) tag and some text. Other HTML elements can be embedded in an SVG document with this technique. The foreignObject element contains x, y, width and height attributes to control the placement of the text box.Multi-Line Text Example
This is a paragraph of text with auto line-wrapping. In SVG, this is accomplished with a foreignObject element, which contains some common HTML tags like body and p, and this text.