I understand how external CSS documents apply to HTML document through a link in the head tag. But I am confused on how JavaScript and PHP connect with an HTML document. Lets say I want to put a poll on my website. If I make the questions with HTML text (CSS formatted), how does PHP play a part in connecting with the server and database, etc?