Which characters required to escape inside HTML attribute values?

Hi, I’m learning HTML by following MDN’s Learn web development. I have a question on when to use HTML entities. If I use double quote around attribute values, is double quote the only character have to be replaced by HTML entities? so this should be correct, < and > is not special inside double quotes:

<meta property="og:title" content="<a>: The Anchor element">

However, I notcie https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a escapes both < and > :

<meta property="og:title" content="&lt;a&gt;: The Anchor element">

and https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started escapes only <:

<a href="/en-US/docs/Web/HTML/Element/a" 
   title="The HTML &lt;a> element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address.">

where the inconsistent comes from? and what’s the best practice to use HTML entities?

Hello @Xu_Chunyang

according to my humble knowledge it depend on where you going to use it and how the browser will interpret it

for example if i tried to write < inside a p element the browser will think that an opening tag

and for both of your example the result is the same

hope that help and have a nice day