meta name attribute
The name attribute on the meta element:
- → sets document metadata through name ⁄value pairs
- metadata = a higher level of data about data
- a name/value pair = name (e.g. application-name)/content (e.g. JIRA) = where JIRA is the name of the application that the page represents
- name is a specific attribute → can be applied ONLY on the next HTML5 elements: button, fieldset, form, iframe, input, keygen, map, meta, object, output, param, select, textarea
name attribute: examples
- application-name → allows you to provide the name of the Web application that the page represents
- author → allows you to provide the name of the author of that page
- description → allows you to provide a relevant/accurate description of the page (Google may display it in search results snippets)
- generator → allows you to provide the name of the software used to generate the document
- keywords → allows you to provide the keywords of your page
- other names available or if you want to register new names → click here
!Observations
- if name attribute is present on element, then content attribute must also be present
- you can select a metadata name from below OR register a metadata name OR choose from the preexisting list
Examples
<meta | attribute | = | "value(s)" | > | Examples | ||
---|---|---|---|---|---|---|---|
1. | name | = | application-name, author, description, generator, keywords.. | <name="application-name" content="JIRA"> <name="author" content="John Smith"> <name="description" content="The name attribute on the HTML5 meta tag. "> <name="generator" content="WordPress 3.1"> <name="keywords" content=" name attribute, html5 meta tag "> | |||
= | OR register a metadata name or choose from the preexisting list | <name="geo.position" content="48.02682000000001;7.809769999999958"> <name="geo.country" content="de"> |
Video demonstration meta name attribute
HTML5 meta name attribute Tutorial
min | video details |
---|---|
00:00 | video tutorial: a element, href attribute objective: understanding href attribute |
00:05 | name attribute on meta element sets document metadata through name-content pairs |
00:20 | this is a name-content pair that allows us to set a metadata aspect; the aspect in this case is: the author of this document |
00:25 | where: name - gives the name of the metadata (author in this case) content - gives the value of the metadata (Joseph James - the name of the author) |
00:35 | Joseph James represents the author of this html page |
00:40 | Note: more than one metadata aspect can be specified per html page (and each aspect should be different) |
01:10 | you can specify keywords for the page or description or.. |
01:33 | any of these standard metadata names can be used in page |
01:40 | OR you can select a new metadata name from the list of registered names: |
01:57 | OR you can register a new name yourself |