The problem of adding text inside css DIV to move down

as shown in the figure, I added four sibling DIV of .numberItem to html. Styles are as follows:
,

.numberItem{
        width:60px;
        height:100px;
        border:solid ;
        display:inline-block;
        font-size:50px;
        text-align:center;
    }

,
where I added words to the first DIV:
,

         <div class="numberItem">5</div>
         <div class="numberItem"></div>
         <div class="numberItem"></div>
         <div class="numberItem"></div>

,

the resulting style is as follows:

.png

Why does it move down?

Mar.29,2022

first of all, we should pay attention to an attribute vertical-align: baseline;. When there is no definition, the default value of vertical-align is baseline;
the elements in the line will be aligned vertically according to vertical-align.
further, you need to know that the baseline of the empty div is at the bottom by default, and once you have the text, it is determined according to the baseline of the text.
and the baseline of the text

clipboard.png

:

clipboard.png

Menu