Issue
- We were creating custom meta tags and we see there are created using "property" attribute instead of "name" attribute. Are there any differences between using name and property? Are they equivalent?
- Could we modify current implementation in order to use "name" instead of "property"?
Environment
- Liferay DXP 7.4
Resolution
-
The name attribute is the "usual" way for specifying metadata in HTML. It’s defined in the HTML5 spec.
-
The property attribute comes from RDFa.
-
RDFa 1.1 extends HTML5 so that it’s valid to use meta and link elements in the body, as long as they contain a property attribute.
-
You can use both ways, HTML5’s name and RDFa’s property, together on the same meta element.
- In order to replace current implementation and use name instead of property, you have to create a custom DynamicInclude that replaces OpenGraphTopHeadDynamicInclude and blacklist the original component. Bear in mind that any change that Liferay perform over that component should be adapted to your custom component.
Additional Information