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 4112716
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:13:53+00:00 2026-05-20T22:13:53+00:00

I have a code in SVG: <svg width=100% height=100% version=1.1xmlns=http://www.w3.org/2000/svg> <rect x=20 y=20 width=250

  • 0

I have a code in SVG:

<svg width="100%" height="100%" version="1.1"xmlns="http://www.w3.org/2000/svg">
    <rect x="20" y="20" width="250" height="250" style="fill:blue">
        <animate attributeType="CSS" attributeName="opacity" from="1" to="0" dur="5s" repeatCount="indefinite" />
    </rect>
</svg>

Now I need to add a text between this rectangle. Can anyone tell me how to do it?

  • 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-20T22:13:53+00:00Added an answer on May 20, 2026 at 10:13 pm

    I am not sure what you mean by “between”. If you mean “centered horizontally and vertically”, then this would do it:

    <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
      <rect x="20" y="20" width="250" height="250" style="fill:blue" />
      <text x="145" y="145" text-anchor="middle" alignment-baseline="middle">
        Hello World
      </text>
    </svg>
    

    Did you mean something else?

    If you are talking about having text filling the rectangle—multiple lines of text wrapping at the edges of the rectangle onto a new line—then you should see this Stack Overflow question instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code like this: <span> <svg height=32 version=1.1 width=32 xmlns=http://www.w3.org/2000/svg style=overflow: hidden; position:
The following is my code: <svg xmlns:xlink=http://www.w3.org/1999/xlink xmlns=http://www.w3.org/2000/svg width=1200px height=1500px viewBox=0 0 400 500
I have an html page with this code <object data=ciao.xhtml width=100% height=100% type=application/xhtml+xml> </object>
I have an inline SVG code inside a HTML page, <body> <div style=width:1000px;height:1000px> <svg
I have a .svg file that has the following code: <svg version=1.1 x=0 y=0
I have a HTML code, <div class=layout data-type=renderingCanvas data-format=canvas style=width:100px; height:100px> </div> where data-type
I have the following inline SVG code in my HTML5 file ( http://jsfiddle.net/Jbfw2/ ):
Here is a code demo I have a SVG with an unknown height. I
I have the following SVG source code that generates a number of boxes with
I have the following code: svg = $(#rsr).svg({ loadURL: '@Url.Content(~/Content/images/svg_curv.svg)', onLoad: svgLoaded }); This

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.