diff --git a/src/rinoh/style.py b/src/rinoh/style.py
index <HASH>..<HASH> 100644
--- a/src/rinoh/style.py
+++ b/src/rinoh/style.py
@@ -476,6 +476,7 @@ class Styled(DocumentElement, metaclass=StyledMeta):
                                     self.style_class.__name__,
                                     style.__class__.__name__))
         self.style = style
+        self.classes = []
 
     def __eq__(self, other):
         return type(self) == type(other) and self.__dict__ == other.__dict__
@@ -582,11 +583,23 @@ class Styled(DocumentElement, metaclass=StyledMeta):
         else:
             return container.document.stylesheet.find_style(self, container)
 
+    @property
+    def has_class(self):
+        return HasClass(self)
+
     def before_placing(self, container):
         if self.parent:
             self.parent.before_placing(container)
 
 
+class HasClass(object):
+    def __init__(self, styled):
+        self.styled = styled
+
+    def __eq__(self, class_name):
+        return class_name in self.styled.classes
+
+
 class InvalidStyledMatcher(Exception):
     """The :class:`StyledMatcher` includes selectors which reference selectors
     which are not defined."""
Provide Styled.has_class for use in selectors

Styled.like(has_class='myclass') checks whether 'myclass' is one of
the classes set for the styled. This can be used to style elements
based on classes set on docutils elements.