javascript – Why is span aligned differently inside button and anchor tag?

I want to show Message and Call buttons side by side. Call button is an anchor tag. I want the text to be vertically aligned in the middle for both of them:

.btn {
  min-height: 100px;
<!DOCTYPE html>
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <link rel="stylesheet" href="" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
  <div class="container">
    <div class="form-row">
      <div class="form-group col-6">
        <button class="btn btn-primary w-100">
          <i class="fa fa-envelope-o"></i>
      <div class="form-group col-6">
        <a href="tel:123456789" class="btn btn-secondary w-100">
          <i class="fa fa-phone"></i>

Why is text aligned on the top for anchor tag? and how can I fix it?

Note: I just asked this question, and someone closed it immediately, saying it is a duplicate of this question… which contains neither any buttons nor any anchor tags. To the person who closed my question: Please take the time to read the question title before rushing to close them.

Source link

Latest articles

Related articles

Leave a reply

Please enter your comment!
Please enter your name here