Example 1 — Get Outer Height of a Paragraph
Official style: read content + padding + border as a Number.
var p = $("p").first();
console.log("outerHeight: " + p.outerHeight() + "px"); How It Works
- Select. Grab the first paragraph with
$("p").first(). - Measure.
.outerHeight()adds padding and border to content height. - Type. The result is a Number — append
"px"only when printing.

