Putting LaTeX equations in webpages

To get started with MathJax, one needs to add a piece of HTML into the header of the webpage. The combination I use is simple:-

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
<script type="text/javascript"
  async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML">

Here is an inline example: $E^2=|{\vec{p}}|^2\!c^2+(mc^2)^2$. Here is a displayed example: $$ R_{\mu\nu} -{\frac{1}{2}}g_{\mu\nu} R +\Lambda g_{\mu\nu} = -{\frac{8\pi G_N}{c^4}}T_{\mu\nu} \,. $$