Per the query you left on @Kiraa's answer, here's a solution that modifies the macro \LT@makecaption of the longtable package directly. The solution uses the \patchcmd macro of the etoolbox package to perform the required surgery on the \LT@makecaption macro.

\documentclass{article}
\usepackage{longtable}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\LT@makecaption}%
{\@tempboxa{#1{#2: }#3}}
{\@tempboxa{#1{\textbf{#2. }}\itshape #3}}{}{}
\patchcmd{\LT@makecaption}%
{#1{#2: }#3}
{#1\textbf{#2. }{\itshape #3}}{}{}
\makeatother
\begin{document}
\begin{longtable}{|c|c|}
\caption{A caption.} \label{tab1} \\
\hline
1 & 2 \\ \hline
3 & 4 \\ \hline
\end{longtable}
\end{document}
To get a linebreak after the Table <x> part, you could use the following code (to be inserted in the preamble in lieu of the patch code shown above):
\usepackage{etoolbox,ragged2e}
\makeatletter
\patchcmd{\LT@makecaption}%
{\@tempboxa{#1{#2: }#3}}
{\@tempboxa{#1{\textbf{#2.\ }}\itshape #3}}{}{}
\patchcmd{\LT@makecaption}%
{#1{#2: }#3}
{\Centering #1\textbf{#2.}\par{\itshape #3}}{}{}
\patchcmd{\LT@makecaption}%
{\hbox to\hsize{\hfil\box\@tempboxa\hfil}}
{\Centering #1\textbf{#2.}\par{\itshape #3}}{}{}
\makeatother