<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<a id="target" href="http://naver.com">link</a>
<script>
let t = document.getElementById("target");
console.log(t.getAttribute("href"));
t.setAttribute("title", "NAVER");
console.log(t.hasAttribute("title"));
t.removeAttribute("title");
console.log(t.hasAttribute("title"));
</script>
</body>
</html>