Home  >  Article  >  Web Front-end  >  How to add spell checker to HTML?

How to add spell checker to HTML?

WBOY
WBOYforward
2023-09-06 21:45:09862browse

How to add spell checker to HTML?

#To add a spell checker, use the spellcheck attribute in HTML. This property checks the spelling and grammar of text in input elements,

Note - It works on input elements, but not on passwords.

Example

You can try running the following code to add a spell checker in HTML -

<!DOCTYPE html>
<html>
   <body>
      Subject: <input type="text" name="sub" spellcheck="true">
      <p>Add an incorrect spelling for a word above and see what happens.</p>
      <p contenteditable="true" spellcheck="true">This is an editable conttent, with a spelling mistake. Click to edit.</p>
   </body>
</html>

The above is the detailed content of How to add spell checker to HTML?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete