Over a million developers have joined DZone.

Showing Attributes Content After Element (like Link Hreflang)

·
You can use pseudo-elements to insert content via CSS, and you can retrieve elements attributes to show them as new pseudo-elements.

Example : show links hreflang attribute.

XHTML :

a link to a french page

CSS :

a:after {
	content: attr(hreflang);
	color: #999;
	margin-left: 0.2em;
}
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}