so, html elements such as <title>are sometimes referred as property, but sometimes they are referred as objects. i am kinda confused. are html elements properties of document object? or are they objects? or are they both at the same time? thanks. to make question meet quality standards i will add some random codes.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
<tite>Hello!</title>is a tag. After the DOM is parsed, it will be an element that is achildNodeof the<html>node, which is part ofdocument. The text content of the title element will also be set as the value ofdocument.title(titlebeing a property ofdocument.) So, to answer your question.... Yes, Yes, and Yesdocument.titleis basically an internal shortcut todocument.getElementsByTagName("title")[0].textContent