HTML <svg> with width Attribute
HTML <svg> with width Attribute
The width
attribute specifies the width of the <svg> element, in pixel.
If width
attribute is not specified then the default value (300px) will be applied.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<svg width="300" height="150" style="border:1px solid red;">
<rect width="200" height="100" />
Sorry, your browser does not support inline SVG.
</svg>
</body>
</html>
Attribute Value
Value | Explanation |
---|---|
px | Specifies the width of the <svg> element. The default value is 300px. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.