Check out example codes for "css vertical align". It will help you in understanding the concepts better.

Code Example 1

.top-align {
	vertical-align: top;
}  

.center-align {
  	vertical-align: middle;
}

Code Example 2

/* Answer to: "css vertical align middle" */

/*
  Go to: https://www.w3schools.com/css/css_align.asp
  Here you can learn many ways to align horizontal and vertically!
  My favourite method is below:
*/

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  border: 3px solid green;
}

Code Example 3

div {
  position: absolute;
  top: 
50px;
  border: 3px solid green;
}

Code Example 4

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style type="text/css">
      div {
        display: table-cell;
        width: 250px;
        height: 200px;
        vertical-align: middle;
      }
    </style>
  </head>
  <body>
    <div>Vertically aligned text</div>
  </body>
</html>

Code Example 5

/* this will center all children within the parent element. */
.parent {
  display: flex;
  justify-content: center; /* horizontal */
  align-items: center; /* vertical */
}

Code Example 6

img.a {
  vertical-align: baseline;
}

img.b {
  vertical-align: text-top;
}

img.c {

      
    vertical-align: text-bottom;
}

img.d {
  
    vertical-align: sub;
}

img.e {
  vertical-align: super;
}

Learn ReactJs, React Native from akashmittal.com