diff --git a/requests_html.py b/requests_html.py
index a2e7b93..6f4cce8 100644
--- a/requests_html.py
+++ b/requests_html.py
@@ -184,7 +184,7 @@ class Element(BaseParser):
@property
def attrs(self):
"""Returns a dictionary of the attributes of the element."""
- attrs = {k: self.pq.attr[k] for k in self.element.keys()}
+ attrs = {k: self.pq.attr[k].strip() for k in self.element.keys()}
# Split class up, as there are ussually many of them:
if 'class' in attrs: