So how do I make separate tabs?

Help, I’m making a chat website off of another chat website, and I would like to add separate rooms that are between the users, like a list of users online and then click on their name and click on chat.