getAttribute() also works if we want to get all the attributes values, like multiple style ones for example.
getAttribute()
style
Make sure to type "style".
"style"