[Tex/LaTex] How to add a space at the beginning of each line

spacing

I am a beginner with TeX. I am trying to put a few spaces at the beginning of the line. Or a tab, whatever would work. But whatever I try it just puts space on the first line.
My questions:
How do I add a space in each line
and is there a good cheat sheet for using TeX?

This is a text document and I am trying to add Verilog code to be shown in the final pdf version of the document.
So here is an example of the latex document:


There are several ways to code a mux. Here is an example below:

\textit{\qquad input wire [7:0]} a;  \\
\textit{\qquad input wire \textit[7:0]} b;  \\
\textit{\qquad input wire [2:0] s;}   \\
\textit{\qquad output wire [7:0] fab;}  

\textit{\qquad assign fab = s[0] ? b : a;}\\  

This code infers an 8bit 2:1 mux.

enter image description here

enter image description here

Best Answer

Since you're trying to typeset code, perhaps the listings package will be helpful. You can adjust the left margin using xleftmargin.

\documentclass{article}
\usepackage[parfill]{parskip}
\usepackage{listings}
\begin{document}
There are several ways to code a mux. Here is an example below:

\begin{lstlisting}[xleftmargin=1em]
input wire [7:0] a;
input wire [7:0] b;
input wire [2:0] s;
output wire [7:0] fab;
assign fab = s[0] ? b : a;
\end{lstlisting}

This code infers an 8bit 2:1 mux.
\end{document}

enter image description here