Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Select Element by Attribute</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ // Highlight paragraph elements $('input[type="text"]').css("background", "yellow"); }); </script> </head> <body> <form> <label>Name: <input type="text"></label> <label>Password: <input type="password"></label> <input type="submit" value="Sign In"> </form> </body> </html>