As I was working with some basic HTML, I encountered an issue.
<span>
<span>Hello</span>
<span>World</span>
</span>
The above code displays:
Hello World
However, when I tried adding an SVG element like this:
<span>
<span>Hello</span>
<span><svg role="img" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0" y="0" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"><path id="heart-full" d="M124 20.4C111.5-7 73.7-4.8 64 19 54.3-4.9 16.5-7 4 20.4c-14.7 32.3 19.4 63 60 107.1C104.6 83.4 138.7 52.7 124 20.4z"/></svg></span>
<span>World</span>
</span>
The elements are no longer side by side and instead appear stacked vertically.
Hello
♥
World
You can view the issue in this fiddle: https://jsfiddle.net/2Lot140g/2/
I'm looking for a solution to maintain the original left to right alignment of child elements. Can anyone provide guidance?