HTML <svg> with height Attribute

HTML <svg> with height Attribute

The height attribute specifies the height of the <svg> element, in pixel.

If height attribute is not specified then the default value (150px) will be applied.

Example

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

ValueExplanation
pxSpecifies the height of the <svg> element.
The default value is 150px.

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.

Meet the Author