Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6801979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:10:03+00:00 2026-05-26T19:10:03+00:00

I have svg embeded in html. For svg embeded in html, ie&chrome do not

  • 0

I have svg embeded in html.

For svg embeded in html, ie&chrome do not support xml:space=preserve. so multiple ” ” will condense to one ” “. replace ” ” with &nbsp will keep multiple ” ” and soleve the problem.

Are there any better way to do it? Thank you. please see example html below:

<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title></title>
    </head>
<body>

<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
viewBox="0 0 1024 768" 
preserveAspectRatio="xMidYMid"
>

<text
x="0"
y="0"
id="textsvg"
font-family="Bitstream Vera Sans" 
font-size="100"
fill="black"
>

<tspan
x="0"
dy="100"
>
wel co     me vs wel&nbsp;co&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;me
</tspan>
</text>

</svg>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:10:03+00:00Added an answer on May 26, 2026 at 7:10 pm

    This works for me in Chrome and Firefox, but not IE9:

    <!DOCTYPE HTML>
    <html><head> 
      <meta charset="utf-8" /><title>Whitespace in SVG in HTML</title>
    </head><body>
    <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100">
      <text font-size="10" fill="black">
        <tspan dy="10" xml:space="preserve">hi—h i—h  i—h     i</tspan>
      </text>
    </svg>
    </body></html>
    

    Even the SVG-in-XHTML version doesn’t work in IE9:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> 
      <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
      <title>Whitespace in SVG in HTML</title>
    </head><body>
    <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100">
      <text font-size="10" fill="black">
        <tspan dy="10" xml:space="preserve">hi—h i—h  i—h     i</tspan>
      </text>
    </svg>
    </body></html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php script (generator.php) which generates certain HTML/XML/SVG depending on various conditions.
I have an SVG file inside HTML, and one of the things I've heard
I have an html page with this code <object data=ciao.xhtml width=100% height=100% type=application/xhtml+xml> </object>
This is a part of my HTML I have embedded the SVG element. <div>
I have an SVG file embedded into an HTML document inside . I can
I have SVG graphics (just text) between html <body> tags. I need the size
i have a html page with 2 embed pages <body> <embed src =toolbar.html type=application/xhtml+xml
I have got a html page embedded with a .svg. I have written most
SVG is a huge standard, which is based on XML. I have parsed SVG
Firefox has native support for SVG. However, I have a web page where the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.