Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <style> textarea.ng-invalid { background-color:pink; } textarea.ng-valid { background-color:lightgreen; } </style> <body ng-app=""> <p>Try writing in the textarea field:</p> <textarea ng-model="myName" required>
The textarea requires content, and will therefore become green when you write in it.