The first white line road marking dates back to 1918 in the United Kingdom, according to Traffic Signs and Meanings. This idea caught on quickly, but the markings weren't recognized as road safety protocol until 1926. In the '30s, the lines were used for much more than telling you how much road you have to work with.
When did roads start getting lines?
The first records of lined roads in the U.S. come from Wayne County, MI in 1911. According to some accounts, the Wayne County Board of Roads chairman Edward Hines found himself driving along behind a leaky milk truck.
When did they start painting white lines on the road?
By 1944, white lines had started to be used to establish the sides of the roads and keep traffic in the proper lane. The government was urged to make it safer for pedestrians to walk during the blackout in World War II. This led to white lines being painted on the sides of the road.