Change Font Size in Table Cell – How to Adjust

fontsizetables

I'm trying to create some beautoful tables with LaTex, but it's kind of hard.

How can I change the font size of only some words within a table cell?

\begin{tabularx}{\linewidth}{lX}
text:&this is a text, and I only want two or three words to be smaller than the rest in THIS table cell!\\[1ex]
\end{tabularx}

Is it possible to change, for example for the words "this is a text" the font size to small?

{\small this is a text} doesn't work.

Best Answer

The following shows how to use \small, or \tiny to obtain smaller text:

enter image description here

Code:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularx}

\begin{document}
\begin{tabularx}{\linewidth}{lX}
    text:&this is a text, and I only want two or three words to be 
    smaller than the rest in THIS table cell!
    {\color{blue}\small this is small text} and {\color{red}\tiny this is tiny text}\\[1ex]
\end{tabularx}
\end{document}