Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Lewis Turner
10,930 PointsAdding text to an SVG
Hi
Am attempting to add some text to the top and bottom arc of an SVG. I have drawn the inside circle as a guide to where to write my text, inserted a text tag with "My text should go here..." but when I preview the SVG, I see the circle, but no text.
Can anybody see what I'm going wrong?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="logo-graphic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="600px" height="500px" viewBox="0 0 900 750" xml:space="preserve">
<defs>
<g id="chunk-five-base64">
</g>
</defs>
<g id="base">
<g id="outline-circle-svg">
<circle fill="none" stroke="#000000" stroke-width="10" cx="450" cy="375" r="262.448">
</circle>
</g>
</g>
<g id="swag">
<g id="outline-dashed-svg">
<circle fill="none" stroke="#000000" stroke-width="3" stroke-miterlimit="10" stroke-dasharray="10.0082,10.0082" cx="450.001" cy="375" r="248.475">
</circle>
</g>
</g>
<g>
<g>
<circle fill="none" stroke="#000000" stroke-width="3" cx="450" cy="375" r="230">
<text>My text should go here...</text>
</circle>
</g>
</g>
<g id="text">
<g id="text-single-line-svg" transform="translate(450,400)" text-anchor="middle" font-family="'chunk-five'" font-size="90" fill="#000000">
<text id="text-single-line-text-svg" x="0" y="0">L j T</text>
</g>
</g>
</svg>