attr and prop
attr reads attributes and prop reads live properties.
Example
$("a").attr("href");
$("a").attr("target", "_blank");
$("input").prop("checked", true);
$("img").removeAttr("title");Exercise
Set a property.
$("i").("checked", true)
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.