See the HTML5 CR, 8.1.2.3 Attributes.
There are four ways how attributes can be specified:
- Empty attribute syntax
- Unquoted attribute value syntax
- Single-quoted attribute value syntax (using
'
(U+0027)) - Double-quoted attribute value syntax (using
"
(U+0022))
So yes, you may use '
. In that case, the attribute value may not contain other '
characters (you’d have to encode them).