I want to create a table with the long text content. Each word in the text is color boxed. But when this is done, the text does not wrap and there is no line break. Below is sample code:
\begin{table}[h!]
\begin{tabular}{|c|c|}
1 & {\colorbox[HTML]{f6faff}{this}\colorbox[HTML]{f5f9fe}{is}\colorbox[HTML]{e8f1fa}{an}\colorbox[HTML]{08306b}{apple}\colorbox[HTML]{bad6eb}{that}\colorbox[HTML]{bad6eb}{fell}\colorbox[HTML]{f0f6fd}{from}\colorbox[HTML]{f6faff}{should}\colorbox[HTML]{f6faff}{tree}\colorbox[HTML]{f4f9fe}{and}\colorbox[HTML]{5fa6d1}{broke}\colorbox[HTML]{d5e5f4}{which}\colorbox[HTML]{57a0ce}{made}\colorbox[HTML]{d6e5f4}{me}\colorbox[HTML]{c4daee}{very}\colorbox[HTML]{c4daef}{badly}\colorbox[HTML]{c4daee}{sad}}
\end{tabular}
\end{table}
I tried the solution given here, but that did not work.
Any suggestions on resolving this issue would be much appreciated. Thank you.

ccolumn type doesn't line break. See here for other column types: https://www.learnlatex.org/en/lesson-08 – Ulrike Fischer Apr 19 '21 at 12:34