# Wrap text in the document inside custom command

I have created a custom command as follows:

\newcommand{\projectSubheading}[3]{
%  \vspace{-1pt}
\item
\begin{tabular*}{0.97\textwidth}[t]{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3}
\end{tabular*}
%\vspace{-5pt}
}


I am passing 3 fields to the command

    \projectSubheading
{Multipurpose Unmanned Autonomous Vehicle \href{https://github.com/}{\faGithub}{Arizona, US}
{Relevant Coursework: Artificial Intelligence, Data Structure and Algorithms, System Programming and Operating Systems, Computer Networks, Soft Computing, Digital Signal Processing}


The output does not fit on the page:

How can I wrap the text inside the command?

• The tabular columns l and r do not break the text into lines. You can use the p column type with a fixed width instead or have a look at the tabularx package. Oct 16 '19 at 4:12

There seems to be no need to place the content inside a tabular-like environment. Instead, the following definition of \projectSubheading uses \hfill to spread the first two arguments, and sets the final argument as a separate paragraph.

\documentclass{article}

\usepackage{hyperref,fontawesome}

\newenvironment{projects}
{\begin{itemize}}
{\end{itemize}}

\item
\textbf{#1} \hfill #2 \par
\itshape\small #3
}

\begin{document}

\begin{projects}