How to center-align <div> elements in Ionic

According to W3 schools, to center align a

element, this is how you do it :
       <div style="margin:auto; width:50%">

But they also said that this will only work if a !DOCTYPE is declared. How and where would I do that in my .html file for the page?

DOCTYPE is declared at the beginning of any HTML file. Using <div style="margin:auto"> <htmlelement> </htmlelement> </div> should give you the effect you are trying to achieve. Or you could also do it in css with a class or id.

You also might want to look at the built CSS Utilities in the framework as well.