How should an inline SVG look like

mowgli

I want to be able to style/change the various parts/paths of an svg, using css or jquery

After some searching, I realize this can't be done with svg-xml as it is (without using extra js/jquery script or other)

So now I'll go for inline svg

How is the complete tag supposed to look like? I mean the correct markup

This is what I have:

<svg width="200" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 492.69 617.696">
  <circle fill="#FFFFFF" stroke="#00ABEB" stroke-width="32" stroke-miterlimit="10" cx="246.16" cy="222.62" r="206.843" />
  </g>
</svg>

Do I even need all the version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ?

Robert Longson

xmlns="http://www.w3.org/2000/svg" and xmlns:xlink="http://www.w3.org/1999/xlink" are not required if you are serving the page as text/html, they are only required for XML documents.

All UAs that I know of ignore the version attribute so you can omit that too.

You cannot however have a </g> tag without a starting <g> tag so your markup there is invalid.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How should BMP header look like?

How should look like a morphline for MapReduceIndexerTool?

How should "baseSiteUrl" look like in SPSite?

How should simple database should look like with two tables?

Scala on IntelliJ with Git: How should the .gitignore look like?

How time zone variable for Kubernetes should look like?

How the unit test for the void method should look like?

Converting JSON to a MySQL table, how should the table structure look like?

How request spec for 'sharing' function should look like?

How should properly formatted data for NER in BERT look like?

How should method of DDD Entity look like in a client app?

How should the parameters for axios look like according to the url example

What should the MBR look like?

Output should look like a quotation

Should my directory structure in Windows look like this?

What Should the Structure of virtualenv Environment Look Like

How can I select look a like id names from SVG using querySelector?

How should my DTO class look like if I have to convert the following JSON into Java Object?

How this PHP code should look like to filter out displayed SQL rows if link is clicked?

React-native + mobx how the Index.js should look like

How should your project's very first commits/branches look like in git flow

How should i format my JSON in Vue using Axios to look like this?

How to make a UITableView look like this?

What should the format of a map with list look like in SpEL

What oauthRedirectURL in openFB should look like, using a cordova app?

What should a "higher order Traversable" class look like?

What should a relationships table look like - Need confirmation of my technique

What should my Objective-C singleton look like?

Pause Monad - What should the monadic type look like?