Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
Insert SVG Images in HTML Documents
How to Insert SVG Images in HTML Documents?
✍: FYIcenter.com
You can insert a SVG image in an HTML document by
inserting the SVG XML document directly any where
in the HTML document.
Here is a simple example of inserting a SVG XML document inside an HTML document. Save it in a file called, square.html.
<html><body> <p>Black <svg xmlns="http://www.w3.org/2000/svg"> <rect x="1" y="1" width="100" height="100"/> </svg> Square... </p> </body></html>
When you open the above HTML file, square.html, in a Web browser, you see a black square inserted inside a text line.
But some how extra white spaces are padded below and after image. The the 100px x 100px square occupied an area of 300px x 150px.
See next tutorial on how to remove padded space around the SVG image.
Also note that the namespace declaration xmlns="http://www.w3.org/2000/svg" is optional when inserting SVG document into an HTML document directly.
⇐ What Is SVG (Scalable Vector Graphics)
2022-10-25, 878🔥, 0💬
Popular Posts:
How to find and read log file in FileZilla Server? I have logging turned on already. For FileZilla S...
Why am I getting the "Spawn Failed: Server at http://127.0.0.1:47353/u ser/fyicenter/didn't respond ...
Why I am getting the "Warning: Unresponsive Script" message box? How to avoid this message box? When...
How to apply a character style in Microsoft Word? I want to emphasize few words in a paragraph. Appl...
What is outlook.office365.com? Our IT tells us to migrate to outlook.office365.com. outlook.office36...