Is cough syrup safe for a 6 year old?

Cough. Maybe so , maybe not. Depends on the child, why he/she is coughing and the cough syrup. There are many illnesses that cause cough. Best to see your doctor about any significant cough so that the cause is found and proper medicine can be given. For minor coughs honey in hot herb tea is soothing for children over 1 year of age.
Yes but caution! By cough syrup, I am assuming you are referring to prescription cough syrup. Take as directed and as little as you can. If you are talking about otc meds, be cautious and use strictly as directed by age and weight. Consult with your pcp or pharmacist if questions. Cough is good if it doesn't interfere significantly with rest or induce vomiting. Be careful!