Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Combining with SVG tags on a HTML page

<svg xmlns="http://www.w3.org/2000/svg" style="display:none">  
  <symbol id="shapes-square" viewBox="0 0 195.74 129.42"> 
      <rect x="0.5" y="0.5" width="194.74" height="128.42" fill="blue" stroke="#000" stroke-miterlimit="10"/>
  </symbol>
</svg>

<!-- Declare Initial 'use' of SVG -->
<div id="box1">
  <svg>
      <title>Blue Square 1</title>
      <use href="#shapes-square"/>
  </svg>
</div>

<br />

<!-- Div to hold the second 'use' of the SVG -->
<div id="box2">
   <svg>
      <title>Blue Square 2</title>
    <use href="#shapes-square" />
  </svg>
</div>
 Run code snippet
Comment

PREVIOUS NEXT
Code Example
Html :: bootstrap 5 tooltip html 
Html :: iframe ember pdf 
Html :: javascript button toggle on off 
Html :: vue paragraph not showing when class applied to it 
Html :: include jquery if not included 
Html :: crawler get text, not get html 
Html :: click button to go to sub pag on html 
Html :: html prime number program 
Html :: lwc unescaped html 
Html :: email link with cc html 
Html :: owlcarousel 
Html :: td whole row css 
Html :: html adding image 
Html :: pyscript 
Html :: twig markdown html 
Html :: how to pass variables from a html form python flask 
Html :: bootstrap input tagsinput 
Html :: HTML HOW TO MAKE QUOTE 
Html :: bootstrap links 
Html :: twig form row label 
Html :: disabled button by attr 
Html :: prevent form submission on enter key 
Html :: form boilerplate 
Html :: navbar in rows in bootstrap 
Html :: submit button bulma 
Html :: how to make a button download a file in html 
Html :: openGraph 4 
Html :: html span 
Html :: html link without opening new tab 
Html :: divide in single rows html using div 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =