added better attribute adition for container elements