LaTeX allows users to create a near-endless variety of documents, so it's impossible to give anything like a comprehensive introduction to writing in LaTeX. However, nearly all LaTeX documents follow the same, fairly simple structure:
All LaTeX documents are divided into two basic sections
The preamble specifies the class of document being written (e.g., article, book, slides, etc.), any packages required, and any options for the document class and packages:
\documentclass[options]{class}
\usepackage[options]{package1}
\usepackage[options]{package2}
⋮
The body directly follows the last line of the preamble. Its general format is fairly simple, with all of the document's visible content written between two lines of code which specify the beginning and end of the document's body:
\begin{document}
⋮
\end{document}
Writing a LaTeX document can either be done in a general text editor or in a LaTeX-specific editor. Below are just a few examples of what's available.
Because of the sheer volume of packages available for LaTeX and difficulties translating them to an HTML environment, browser-based options are less flexible but more accessible, with the added benefit that they allow collaboration on documents.