Hi Bagsensei,
I don’t know how I arrived at this web site, but I read your question, and it made me think. Thank you for asking the question, because the pondering over it brought me clarity. I hope the following is helpful.
The answer to your question hinges on two issues.
First, it goes to the heart of the three forms of the article in English:
1. No article
2. The indefinite article, ‘a’ or ‘an’
3. The definite article, ‘the’
Form 1) is used when you are speaking in a very general, often abstract, sense. For example, ‘Freedom must never be lost.’
Form 2) is used for an instance of a countable noun that hasn’t (yet) been specified. For example, ‘I would like a drink.’
Form 3) is used for a specific instance of a countable noun. Usually, the specificity has been achieved by its already having been mentioned. For example:
Waiter: ‘Would you like a drink?’ (Form 2))
Customer: ‘Yes, please.’
…later…
Waiter: ‘How is the drink?’ (Form 3))
However, in form 3) the specificity may be implicit, in that it is not necessary that the specific instance has already been mentioned, if everyone knows which specific instance of the noun you are referring to. For example, a friend arrives wearing a spectacular hat. You say, ‘I love the hat.’ This is correct, even although the hat has not yet been mentioned in the conversation, because it is clear to all which hat you are referring to.
The second issue pertaining to your question is that the word ‘class’, even in this specific meaning of study at school, holds three quite distinct sub-meanings:
a) It can mean the state of being in a classroom, for example as opposed to the state of working in a factory, or to the state of wandering the world freely. This is seen in examples such as, ‘I couldn’t handle class, so I left school when I was 16,’ or, ‘I cut class yesterday,’ or, ‘I got a headache in class the other day.’
b) It can mean a particular course of study. Examples would be, ‘I’m taking a class in Metaphysics next year,’ or, ‘When you take the Metaphysics class you can’t take the Philosophy class at the same time.’
c) It can mean a particular session of study, in a particular room (or web site) on a particular day, or to the students therein. Examples would be, ‘I’ve got a class after lunch, but I can meet you after that,’ or, ‘Did you like the class this morning?’
The answer to your question lies in combining these two issues, the issue of the three forms of the article in English, and the three meanings of the word ‘class’. (I am not considering other meanings of the word class, such as ‘societal status’.)
Look at the examples I gave for each of the three meanings of ‘class’. It is no coincidence that in meaning a) the article used in each example is form 1)—no article. This is because each example is using ‘class’ in a very general sense, as meaning, ‘the state of being in a classroom.’ In this sense, the noun is quite abstract, and not countable.
In meanings b) and c), on the other hand, the noun is countable. This is why the following sentences are correct:
‘I took eight classes last year.’—meaning b)
‘I had eight classes yesterday.’—meaning c)
In each of meanings b) and c) the noun is countable, and so form 2) or 3) of the article is appropriate.
So let’s come back to your question. You ask about the two sentences:
i) Welcome to class.
ii) Welcome to the class.
Both are correct, and we now have the tools to analyse their subtly different meanings, and to determine when to use each.
In sentence i) you don’t use an article. Therefore, you must be using meaning a) of the word ‘class’—otherwise you would have had to have used an article. Meaning a) of ‘class’ is ‘the state of being in a classroom’. So if you say to your students at the beginning of their session, ‘Welcome to class’ you are meaning, ‘Welcome to the state of sitting here and learning with me and these other students.’ Therefore, saying, ‘Welcome to class,’ (meaning a)) is quite appropriate to say to your students at the beginning of a class (meaning c)).
When else might you say, ‘Welcome to class?’ Well, any time that you want to use ‘class’ in meaning a)—in other words, in the very general sense. Let’s say, for example, that you are writing a script for one of those uplifting Hollywood movies. A man had a rough childhood, and was taken from school at an early age. He never received an education; his youth was spent living on the streets. He then turns his life around, makes good, has a family, builds a business—but he has never learned to read. A schoolteacher takes an interest in him, and after many taut scenes his pride is overcome. In the final scene of the movie, the schoolteacher is standing in front of the class (meaning c)), when the door opens. The man is standing there, hesitating. The teacher says, ‘Welcome to class.’ The man quietly takes a seat; the other students stand and applaud. The movie audience is moved to tears.
Could the teacher have said, ‘Welcome to the class?’ Yes, but that would have been meaning b) or c)—welcome to this course of study, or welcome to this particular session. However, ‘Welcome to class’ is more powerful, because the teacher is essentially saying, ‘After your long and arduous journey through life, welcome to the idea of sitting in this room and educating yourself.’ That’s why the audience breaks down.
The other sentence you give us, sentence ii), ‘Welcome to the class,’ is also correct in the setting in which you want to use it, but it means something slightly different. In the setting you give, welcoming your students to an online group class, you are using meaning c) of the word ‘class’—you are welcoming them to this particular session.
So both of your constructs, ‘Welcome to class’ (sentence i); ‘class’ meaning a); article usage 1)) and, ‘Welcome to the class’ (sentence ii); ‘class’ meaning c); article usage 3)) are correct, but they mean different things.
DonnyB mentioned that ‘Welcome to class’ sounded American English to him. That is because meaning a) of ‘class’ is more common in America than in the UK. In the USA, all three meanings are in use; in the UK ‘class’ generally refers to meaning c), which, being a countable noun, requires an article.
Now, this is all long and involved, but I am pretty sure that it is a reasonable assessment of what is going on. It is subtle and nuanced, however, and, as so often in English, the precision of its application is variable. However, the subtle nuances can lead to some of the richness of English. Take, for example, these lyrics by Bruce Springsteen:
Well, we busted out of class
Had to get away from those fools
We learned more from a 3-minute record, baby
Than we ever learned in school
In the first line, the use of no article before ‘class’ (article usage 1)) is deliberate, and not just to make the line scan. By choosing to use no article, Bruce must be using meaning a) of ‘class’. This is the meaning of ‘the state or very idea of sitting in a classroom.’ So the hero of the song is running away from the whole idea of the discipline of study. But—and here’s the wonderful thing—the word ‘class’ also has meanings b) and c). And in particular, meaning c) has very visual overtones. With meaning c) we can see the class of desk-bound students, the dry lesson taking place, and our hero busting the door open and running out into the sunshine. In other words, meaning a) is implied by the grammar, but we don’t lose the feeling and strong visual element of meaning c).
This is why I love English!