Comparison table for subelements

Can you please help me determine which comparison design is better for UX? I have documents with elements. Every element has 5 attributes. I need to compare those attributes across 3 to 5 documents. Number of elements can be max 10 for one document.

I try 2 designs for simple comparing feature.

Which one will be better for UX? Or should I use something completely different?

Thank you.