After adding <!doctype html>, my HTML just gets break. <!doctype html> is doing some strange behavior.
<!doctype html>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"/>
<div id="bar-sticky">
<span id="sec-menu"><i class='fa fa-bars'></i></span>
<span id="sec-search"><i class='fa fa-search'></i></span>
</div>
Here the size of tag <i>
is different than the parent tag <span>
's size when there is no padding/margin. Then from where this strange space is coming from?
I have tried in so many ways like - verticle-align: middle; box-sizing: border-box; white-space: nowrap; word-wrap: normal;none; (*) of them worked. How to deal with it? In quirks mode - everything is just fine.