  Single- and few-layer transition metal dichalcogenides have recently emerged
as a new family of layered crystals with great interest, not only from the
fundamental point of view, but also because of their potential application in
ultrathin devices. Here we review the electronic properties of semiconducting
$MX_2$, where $M=$Mo or W and $X=$ S or Se. Based on of density functional
theory calculations, which include the effect of spin-orbit interaction, we
discuss the band structure of single-layer, bilayer and bulk compounds. The
band structure of these compounds is highly sensitive to elastic deformations,
and we review how strain engineering can be used to manipulate and tune the
electronic and optical properties of those materials. We further discuss the
effect of disorder and imperfections in the lattice structure and their effect
on the optical and transport properties of $MX_2$. The superconducting
transition in these compounds, which has been observed experimentally, is
analyzed, as well as the different mechanisms proposed so far to explain the
pairing. Finally, we include a discussion on the excitonic effects which are
present in these systems.
