this is the part you need to change:
var map = L.map('map').setView([40, 5], 3);
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
attribution: ' ©<a href="https://www.mapbox.com/about/maps/">Mapbox</a> ©<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong> <a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',
tileSize: 512,
maxZoom: 18,
zoomOffset: -1,
id: 'mapbox/streets-v11',
accessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
}).addTo(map);
do you see how the attribution value appears to be multi-line? it isn't. it's 1 line, all the way from to "strong". everything following the
comma after accessToken to the comma following "strong" is 1 line. if you try to copy/paste the code above, it will cause an error (no gray map box). after you copy it, you need to go to the end of each "line" and carefully hit the delete butto to turn the multi-line string back into 1 line. (if you know how to split a string in javascript, you can turn a long line into multiple lines). make sure you use the "©" term for
copyright.
it's very difficult to see in the 2nd image attached, but that long line, is what you're looking for.