The main difference between IPv4 and IPv6 is that Ipv4 works on quad format whereas IPv6 doesn't support that format. Secondly, IPv6 has more features as compared to IPv4. IPv4 is discussed first as it is easier to understand the quad notation and other features of IPv4.
IPv4 and IPv6 differ in address formats, with IPv4 using 32-bit addresses and IPv6 using 128-bit addresses. IPv4 is discussed first in texts because it was the initial and widely adopted version, serving as a foundation for understanding networking. The need for IPv6 arises due to the exhaustion of IPv4 addresses.