Prev Demo
jQuery
>
.Height() - Get & Set Height Of Element
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <h1>This is H1</h1> <h2>This is H2</h2> <script> $("h1").css("background", "#c0c0c0").height("200px"); </script> <h1 style="color:pink">The Height of the H1 is.....in dialogue box.<h1> <script> alert($("h1").height()); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output