LaTeX equivalent of in HTML?
In answer to your first question: There are many ways of adding specific spaces to text. Some examples include forcing an actual "inter word space" to specifying a regular space length to specifying a length based on an object (text or otherwise). In that order you can use the following:
\documentclass{minimal}%
\begin{document}
This is textual phrase A\ \ \ This is textual phrase B% 3 inter word spaces
\par
This is textual phrase A\hspace{5em}This is textual phrase B% space of length 5em
\par
This is textual phrase A\hphantom{spaces}This is textual phrase B% space equivalent to length of word 'spaces'
\par
This is textual phrase A\hfill{}This is textual phrase B% infinitely stretchable space
\end{document}
This is the equivalent output:
Perhaps some of these methods answer your second question. However, in its general context, the answers are probably too many to list here.
In (La)TeX, a 'tie'
~
is the exactly equivelant of
in HTML, say, no-break space. However, it is often misused in documents.See here to know: When should I use non-breaking space?
It is a large topic. Generally speaking, it is better to prevent the direct using of most spacing commands in LaTeX documents. Just use semantic commands and define some if necessary. (c.f. Do semantics matter in LaTeX? If not, why not?) That's to say, one should use
quote
,itemize
,verse
,quotation
,abstract
instead of many\
,~
,\quad
,\qquad
,\;
or\hspace
's. Do fine turning when necessary only.Example:
% Good \title{Foo} \author{Bar} \maketitle
Versus
% Bad \begin{center} {\Large Foo}\\ Bar \end{center}
Versus
% Awful ~~~~~~~~~~~~~~~~~~~~~~~~~~~\Large{Foo}\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Bar
Possible fine turning:
\documentclass{article} % turn the format in preamble \usepackage{titling} \pretitle{\begin{center}\LARGE\bfseries} \posttitle{\end{center}\vspace{2ex}} \title{Foo} \author{Bar} \begin{document} \maketitle % ... \end{document}