SPELL-CHECK USER CONTENT

Most web browsers provide a useful built-in spell-check feature available to any website that allows the user to type text. This feature is enabled when a spellcheck attribute is enabled on an editable text block. Note that content displayed on a site that is not editable is not spell-checked.

This technique can apply to almost any editable text block. This is possible because spellcheck is a new global attribute in HTML5. It is most common to see this on input type=text or textarea elements:

<input type='text' spellcheck='true' value='Spell-check text input'>

If any elements exist under a spellcheck-active block, they will inherit the spellcheck property. If you add spellcheck to <body>, all form inputs and editable ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.