Storing space delimited line in var with loop?

I have a script that converts a file into an html table. This script works fine for a 1 column table. However, I'm trying to do this for a multi-column table. My input file will look something like this:

a b c
d e f
g h i

My script basically works by taking in each line and putting that value into an html tag using a while loop reading each line. Now I need to make the script read each value of each line. The number of columns will be set so I figured what I could do is just have some sort of loop that stores each value of a line into a variable and then use it to build my table. I'm just not sure how to do that.

Is there a way to get the first line and have say these variables set like this $1=a, $2=b, $3=c? Each line will always be space delimited. Any help would be much appreciated. Thanks!

Is the number of columns fixed? This will help with that:

#!/usr/bin/ksh

while read value1 value2 value3; do
# do your html conversion here
done < /path/to/input_file

hi
see follow example

input(a.txt):

a b c
d e f

code:

cat a.txt | awk '{
printf("$s,$s,$s",$1,upper($2),$3)
}' a.txt

output:

a B c
d E f