A command is a backslash followed by letters, and it may take arguments in braces. Step 4 of 17 of the LaTeX tutorial, editable as you read it.
Render a LaTeX or mhchem formula as an SVG or PNG image, learn the notation step by step, and practise it with graded exercises. The tool itself needs JavaScript; the rendering API does not.