<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd" -->

---
title: Introducing the &lt;geolocation&gt; HTML element | daily.dev
description: Chrome 144 introduces the `&lt;geolocation&gt;` HTML element, a declarative alternative to the JavaScript Geolocation API. This element requires user interaction...
canonical: https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Introducing the &lt;geolocation&gt; HTML element | daily.dev
og:description: Chrome 144 introduces the `&lt;geolocation&gt;` HTML element, a declarative alternative to the JavaScript Geolocation API. This element requires user interaction...
og:url: https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd
og:image: https://api.daily.dev/og/posts/kLyHHPdXd.png
og:image:alt: Introducing the &lt;geolocation&gt; HTML element
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introducing the <geolocation> HTML element

**[Chrome Developers](https://daily.dev/sources/chrome)** · 8 min read · 589 upvotes · 24 comments

## Summary

Chrome 144 introduces the `<geolocation>` HTML element, a declarative alternative to the JavaScript Geolocation API. This element requires user interaction (clicking a button) to request location data, reducing accidental blocks and browser interventions. It evolved from a generic `<permission>` element after origin trial feedback showed improved user trust and success rates. The element simplifies implementation by handling permission states automatically, supports attributes like `autolocate` and `watch`, and includes styling constraints to prevent deceptive patterns. A polyfill and progressive enhancement strategies ensure backward compatibility with browsers that don't support the new element.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://developer.chrome.com/blog/geolocation-html-element>

## Community discussion

Top comments from developers on daily.dev.

**@sahilatahar** · 29 upvotes

> If they are adding `<geolocation>`. They will definitely add `<if condition="checkConditon()"></if>` `<else></else>` soon. Now CSS also have if else only HTML is left.

**@skate\_boy** · 2 upvotes

> Ohh nice to know. Thanks for sharing.

**@hdnelson2024** · 1 upvotes

> Gracias excelente aporte

**@bonyohedaniel** · 1 upvotes

> really? WOW after the addition of the "if-else" to CSS this? it's awesome

**@crispy1260** · 1 upvotes

> What am I missing? Why don't we update the geolocation API to allow reprompt of permissions OR have browsers remove this ability to snooze sessions or add additional UI?

## Similar posts on daily.dev

- [A look at the geolocation HTML element and how it works](https://daily.dev/posts/a-look-at-the-geolocation-html-element-and-how-it-works-hqpxn9gba) · Piccalilli · 20 upvotes · 1 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript), [#html](https://daily.dev/tags/html), [#google-chrome](https://daily.dev/tags/google-chrome)

[View this post on daily.dev](https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Introducing the <geolocation> HTML element","url":"https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd"},"datePublished":"2026-01-13T16:25:15.583Z","dateModified":"2026-01-13T16:25:37.047Z","description":"Chrome 144 introduces the `<geolocation>` HTML element, a declarative alternative to the JavaScript Geolocation API. This element requires user interaction...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b81dbb915bed6c6b4bbe773736dc277a?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b81dbb915bed6c6b4bbe773736dc277a?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"Chrome Developers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Chrome Developers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/e9b306fd1b484113b937dae36b867f37","url":"https://daily.dev/sources/chrome"},"commentCount":24,"discussionUrl":"https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":589},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":24}],"keywords":"webdev,javascript,html,google-chrome","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Chrome Developers","item":"https://daily.dev/sources/chrome"},{"@type":"ListItem","position":3,"name":"Introducing the <geolocation> HTML element"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/introducing-the-geolocation-html-element-klyhhpdxd","comment":[{"@type":"Comment","text":"If they are adding &lt;geolocation&gt;. They will definitely add &lt;if condition=&quot;checkConditon()&quot;&gt;&lt;/if&gt; &lt;else&gt;&lt;/else&gt; soon. Now CSS also have if else only HTML is left.","datePublished":"2026-01-15T06:50:25.435Z","url":"https://daily.dev/posts/kLyHHPdXd#c-RyDusT9Gk","author":{"@type":"Person","name":"Sahil Atahar","url":"https://daily.dev/sahilatahar","image":"https://media.daily.dev/image/upload/s--jYTP98TM--/f_auto/v1768622996/avatars/avatar_3E5CUHMGZwkEqSfvFYXsF?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":29}},{"@type":"Comment","text":"Ohh nice to know. Thanks for sharing.","datePublished":"2026-01-14T18:36:20.626Z","url":"https://daily.dev/posts/kLyHHPdXd#c-iOC5UpPDh","author":{"@type":"Person","name":"Sebastian","url":"https://daily.dev/skate_boy","image":"https://avatars.githubusercontent.com/u/70155015?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Gracias excelente aporte","datePublished":"2026-01-14T14:16:49.867Z","url":"https://daily.dev/posts/kLyHHPdXd#c-Fk5SBhqa5","author":{"@type":"Person","name":"Nelson Herrera Diaz","url":"https://daily.dev/hdnelson2024","image":"https://lh3.googleusercontent.com/a/ACg8ocKBbRj88TYlOaJ4kRFbdoL0_hVu8B7CsygaLZTYDOGF4ONVmw=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"really? WOW after the addition of the “if-else” to CSS this? it’s awesome","datePublished":"2026-03-07T23:31:27.667Z","url":"https://daily.dev/posts/kLyHHPdXd#c-oJOvDfm9I","author":{"@type":"Person","name":"Dañel 7","url":"https://daily.dev/bonyohedaniel","image":"https://media.daily.dev/image/upload/s--Z2IuhNyb--/f_auto/v1764810324/avatars/avatar_UfEARDEsprULlR8E37cXP?_a=BAMAK+ZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"What am I missing? Why don’t we update the geolocation API to allow reprompt of permissions OR have browsers remove this ability to snooze sessions or add additional UI?","datePublished":"2026-01-19T20:52:03.027Z","url":"https://daily.dev/posts/kLyHHPdXd#c-YkxnMpDTY","author":{"@type":"Person","name":"Christopher Payne","url":"https://daily.dev/crispy1260","image":"https://avatars3.githubusercontent.com/u/3475222?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

