I generally HTML-encode any user generated content that I render on my website, so ampersands become &
and so on. I was wondering if this should be done (from a standards point of view) to any dynamically generated meta tag throughout a site?
Metadata is data that describes data, and HTML has an "official" way of adding metadata to a document — the <meta> element.
<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.
A meta description should include a compelling summary of the page someone is about to click on. It should clearly tell them what they'll gain by clicking through. Meta descriptions should include a target keyword to help search engines index and rank the page.
It doesn't matter which you use, but it's easier to type the first one. It also doesn't matter whether you type UTF-8 or utf-8 . You should always use the UTF-8 character encoding. (Remember that this means you also need to save your content as UTF-8.)
Absolutely. All content within the HTML document must be encoded this way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With