# Use of custom elements with attributes

**URL:** https://discuss.httparchive.org/t/use-of-custom-elements-with-attributes/1592
**Category:** Analysis
**Created:** [March 6, 2019, 11:57pm UTC](https://discuss.httparchive.org/t/use-of-custom-elements-with-attributes/1592 "2019-03-06T23:57:30Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![briankardell](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/briankardell/32/641_2.png) [@briankardell](https://discuss.httparchive.org/u/briankardell)
#### Post date: [March 12, 2019, 10:09pm UTC](https://discuss.httparchive.org/t/use-of-custom-elements-with-attributes/1592/2 "2019-03-12T22:09:35Z")

</div>

I’m not skilled with this and it seems potentially pricey to try to learn on the fly but would it make sense to do

```sql
 #standardSQL
SELECT * FROM (
SELECT
  COUNT(*) AS frequency,
  REGEXP_EXTRACT(r.body, r"(?i)(<[a-z]+-[a-z0-9_-]*\s+(?:[^>/]|/[^>])+>)") AS match,
  COUNT(DISTINCT url) AS urls
FROM
  `httparchive.response_bodies.2019_02_01_desktop` AS r
WHERE
  page = url
GROUP BY
  match
ORDER BY
  frequency DESC
) WHERE match IS NOT NULL

```

So that this matches the same basic format/data of better one in [Use of HTML elements](https://discuss.httparchive.org/t/use-of-html-elements/1438) ? Maybe not entirely as this needs further processing still to get just the tag name and join up the counts… It feels like these two ‘ideas’ tho would be good ones to run/publish every so often in a place that is easy to find/discuss.

---

_[View the full topic](https://discuss.httparchive.org/t/use-of-custom-elements-with-attributes/1592)._
