Is the 6th rib attached to 7th rib, and 7th rib to 8th?
Those are just a part of the costal cartilage, which is only found at the anterior ends of the ribs, providing medial extension. This connects the ribs to the sternum and is made of hyaline cartilage. Here is a clearer diagram of the cartilage part:


Ribs 8–12 are called false ribs (vertebrochondral ribs- attached to vertebra and cartilage). The costal cartilages from these ribs do not attach directly to the sternum, but are all attached to the cartilage of the 7th rib. For ribs 8–10, the costal cartilages are attached to the cartilage of the next higher rib. So, in a way, you are right in saying that the 8th and 7th ribs are attached.
The 6th and 7th ribs, though, are not attached. There are just cartelagenous bridges present in between them. The first seven are called vertebrosternal ribs. (attached to vertebra and sternum)

Sources:

https://opentextbc.ca/anatomyandphysiology/chapter/7-4-the-thoracic-cage/

https://en.wikipedia.org/wiki/Rib

https://www.pulsus.com/scholarly-articles/cartilaginous-bridges-between-the-adjacent-costal-cartilages--a-case-report.html