Prev Demo
jQuery
>
ID Selectors("#Id")
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <h1>ID selector.</h1> <p id="p">This is Not Selected </p> <p id="p1">This is Selected</p> <p id="p2">This is Not Selected</p> <script language="javascript" type="text/javascript"> $("#p1").css("border", "5px solid green"); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output