\documentclass[tikz,border=7pt]{standalone}
\begin{document}
\begin{tikzpicture}
  \draw[teal!70!black,thick] (0,0) -- (3,0);
  \draw[thick] (0,-.15) -- (0,.15) node[above] {A};
  \draw[thick] (3,-.15) -- (3,.15) node[above] {B};
  \node[below] at (1.5,-.12) {Length};
\end{tikzpicture}
\end{document}
