Unselectable Attribute Example – HTML Syntax – Unselectable Example
Unselectable Attribute Example – HTML Syntax – Unselectable Example
Purpose: – Illustrates the HTML syntax for the unselectable attribute.
You can download an excellent free html editor at nvu. This HTML editor will allow you to easily experiment with these examples. You can view an 8-minute video tutorial that I did at NVU HTML Editor
Function: unselectable=”on” or unselectable=”off” When unselectable is on, you cannot highlight the element with your cursor in the browser.
Restrictions: Does not work in Firefox browser
< !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Unselectable Example</title> </head> <body> <p unselectable="off"> selectable text. </p> <p unselectable="on"> unselected text - does not work in firefox </p> </body> </html> |
