Note: You are viewing the development version of Schema.org. See how we work for more details.

cssSelector

A Schema.org Property
A CSS selector, e.g. of a SpeakableSpecification or WebPageElement. In the latter case, multiple matches within a page can constitute a single conceptual "Web page element".

Values expected to be one of these types

Used on these types

Source

https://github.com/schemaorg/schemaorg/issues/1389


Examples

Example 1
Copied
Example notes or example HTML without markup.
  1. An example of 'speakable' markup (JSON-LD only, initially).
Example encoded as JSON-LD in a HTML script tag.
  1. {
  2. "@context": "https://schema.org/",
  3. "@type": "WebPage",
  4. "name": "Jane Doe's homepage",
  5. "speakable":
  6. {
  7. "@type": "SpeakableSpecification",
  8. "cssSelector": ["headline", "summary"]
  9. },
  10. "url": "http://www.janedoe.com"
  11. }
Structured representation of the JSON-LD example.
Example 2
Copied
Example notes or example HTML without markup.
  1. An example of speakable markup in Microdata in HTML head section.
Example encoded as Microdata embedded in HTML.
  1. <!DOCTYPE html>
  2. <html>
  3. <head rel="home" href="/" itemid=""  itemscope itemtype="https://schema.org/SpeakableSpecification">
  4. <title>Example showing complex structures in HTML head</title>
  5. <meta itemprop="cssSelector" content=".title" />
  6. <meta itemprop="xpath" content="/html/body/h3" />
  7. </head>
  8. <body>
  9. <h1 class="title">Complex Microdata in HTML head</h1>
  10. <p>...</p>
  11. </body>
  12. </html>