Re: Adding Semantic Metadata to Webpages' Elements via CSS Selectors

Martynas Jusevičius,

Hello. There are some similarities but also some differences. Differences between RDFa and the indicated technique include:


  1.
RDFa requires adding attributes to HTML document markup to indicate and express semantic metadata. The indicated technique allows statements, graphs, and/or datasets to be attached to documents' elements by means of these elements being selected using CSS. So, no extra markup or attributes are required for the indicated technique (aside from, in some cases, style classes using the class attribute).

     *
The indicated technique allows selecting elements by their attributes, attributes' values, class names, IDs, types, and more. It should work with simple, compound, complex, and relative selectors as well as lists of these.

  2.
RDFa adds semantic metadata to HTML documents within the HTML documents themselves. In the indicated approach, semantic metadata could be expressed within <style> elements in the documents or in external stylesheets. As considered, elements would be able to have a style property named "metadata" which would, per Additive CSS, be able to hold zero, one, or multiple semantic statements (i.e., graphs or datasets).


Best regards,
Adam Sobieski


________________________________
From: Martynas Jusevičius <martynas@atomgraph.com>
Sent: Tuesday, April 14, 2026 4:10 AM
To: Adam Sobieski <adamsobieski@hotmail.com>
Cc: W3C Semantic Web IG <semantic-web@w3.org>
Subject: Re: Adding Semantic Metadata to Webpages' Elements via CSS Selectors

Wasn't RDFa created for this purpose?

https://www.w3.org/TR/rdfa-primer/


On Tue, Apr 14, 2026 at 9:16 AM Adam Sobieski <adamsobieski@hotmail.com<mailto:adamsobieski@hotmail.com>> wrote:
Semantic Web Interest Group,

Hello. I'm excited to share a new idea with the group that I recently posted in a CSS WG issue comment: https://github.com/w3c/csswg-drafts/issues/1594#issuecomment-4235095851 .

Succinctly, the idea is a means for adding semantic metadata to webpages' elements via CSS selectors. It is a potential use case for the Additive CSS proposal.

I hope that the idea is of some interest. Thank you.


Best regards,
Adam Sobieski
http://www.phoster.com

Received on Tuesday, 14 April 2026 09:50:18 UTC