You don’t know what is the width and height of any elements on any web pages because there is no ruler for you to measure it, it is not possible for you to use a physical ruler to measure them on your computer screen as even if you get the results right, it is not a convenience way for you.
In addition, you may get inaccurate results for different screen resolution and size of PC you use.
If you are Firefox user, you can use MeasureIt which is an add-on provided by Firefox. Add it to your Firefox browser, then simply draw a ruler across any webpage to check the width, height, or alignment of page elements in pixels. This tool helps you to measure the targets you want accurately on your Mozilla Firefox browser’s screen.