How to Write Meta Tags
By Tools Star Hub Editorial Team · Published
The Meta Tag Generator writes HTML from the fields you type. Paste that HTML into the head of a page. A blank title is rejected. Every result includes a charset tag, a title, and a robots tag. The page does not fetch a live URL, and it does not check how a site will share the link.
A title with an ampersand has to be escaped or the tag breaks. A & B is written as A & B inside the title tag. Empty optional fields are left out, so a description you did not fill does not become an empty description tag. The robots tag is still written from the index and follow choices.
How to write meta tags
- Enter a title. The title can be up to 200 characters. A blank title is rejected. Quotes and ampersands in the text are escaped.
- Add the optional fields you want. A description can be up to 500 characters. A canonical URL, an Open Graph image, an Open Graph URL, and a Twitter image must be absolute http or https URLs, up to 2,000 characters. Open Graph type is website, article, or none. Twitter card is summary, summary_large_image, or none.
- Press Generate. The HTML is built in this browser tab. Tools Star Hub does not send those fields to a server or save them in local storage. Generate does not request the canonical URL or any image URL you typed.
- Copy the HTML into the page head. A charset tag, the title, and a robots tag are always there. A robots value looks like index, follow or noindex, nofollow. Optional tags appear only when you filled them.
Example
A title and description
Title Sample page and description A short description of the page., with index and follow, writes a charset tag, the title, the description, and a robots tag of index, follow.
An ampersand in the title
Title A & B is written as A & B inside the title tag.
Things to watch
A Twitter title needs a card
A Twitter title, description, or image without a card is rejected. Choose summary or summary_large_image first. None leaves those Twitter tags out.
This page does not preview a live link
Generate writes the tags. It does not open the URL, and it does not show how a social site will display the link. A live share check is a different page.
FAQ
- How is A & B written in the title?
- As A & B inside the title tag. Quotes and ampersands in the text are escaped.
- What is written when the optional fields are empty?
- A charset tag, the title, and a robots tag. Empty optional fields are left out. The robots tag still uses the index and follow choices, such as index, follow.
- Why was a Twitter title rejected?
- A Twitter title, description, or image needs a card of summary or summary_large_image. Choosing none, then filling a Twitter title, is rejected.
- Does Generate open the canonical URL?
- No. It writes the HTML in this browser tab. It does not request the canonical URL, the Open Graph image, the Open Graph URL, or the Twitter image.
To write title, description, robots, and social tags as HTML, use the Meta Tag Generator. It runs in the browser and does not fetch a live URL.