(a) Whenever any roadway has been divided into two or more clearly marked lanes for traffic or wherever traffic is lawfully moving in two or more substantially continuous lines in the same direction, the following rules apply:
(1) A vehicle shall be driven, as nearly as is practicable, entirely within a single lane or line of traffic and shall not be moved from such lane or line until the driver has first ascertained that such movement can be made with safety.
(2) Upon a roadway which is divided into three lanes and provides for two-way movement of traffic, a vehicle shall not be driven in the center lane except when overtaking and passing another vehicle where the roadway is clearly visible and such center lane is clear of traffic within a safe distance, or when preparing for a left turn, or where such center lane is at the time allocated exclusively to traffic moving in the direction the vehicle is proceeding and is posted with signs to give notice of such allocation.
(3) Official signs may be erected directing specified traffic to use a designated lane or designating those lanes to be used by traffic moving in a particular direction regardless of the center of the roadway, or restricting the use of a particular lane to only buses during certain hours or during all hours, and drivers of vehicles shall obey the directions of such signs.
(4) Official traffic control devices may be installed prohibiting the changing of lanes on sections of roadway and drivers of vehicles shall obey the directions of every such device.
(b) Except as otherwise provided in this subsection, whoever violates this section is guilty of a minor misdemeanor. If, within one year of the offense, the offender previously has been convicted of or pleaded guilty to one predicate motor vehicle or traffic offense, whoever violates this section is guilty of a misdemeanor of the fourth degree. If, within one year of the offense, the offender previously has been convicted of two or more predicate motor vehicle or traffic offenses, whoever violates this section is guilty of a misdemeanor of the third degree.
If the offender commits the offense while distracted and the distracting activity is a contributing factor to the commission of the offense, the offender is subject to the additional fine established under Section 303.991 of the Traffic Code.