WHITE LINES painted on the pavement indicate traffic traveling in your direction.
Broken White Line: you may change lanes if it is safe to do so.
Solid White Line: requires you to stay within the lane and also marks the shoulder of the roadway.
Ya think it might have something to do with warning about a hazard on the roadside? Lol no really! Actually they are what you put on to warn. Readers suggested diagonal lines on the pavement in front of hydrants on the lawns of homes on inner-city streets, or painting the adjacent curb yellow, to warn off drivers.
YELLOW LINES mark the center of a two-way road used for two-way traffic. You may pass on a two-way road if the yellow centerline is broken. When a solid and a broken yellow line are together, you must not pass if you are driving next to the solid line. Two solid yellow lines mean no passing. Never drive to the left of these lines.
When there are double solid yellow lines.
When a solid yellow line is on your side.
You may pass if movement can be made safely.