Is there an html "location" element?
Question by TestSubject528491
The HTML5 time
element looks pretty cool, but I’m wondering if there’s such thing as a location
or place
element. It may be useful in GPS applications or the like?
Answer by Whymarrh
Sadly the <location>
element doesn’t exist. I for one would agree that semantically it’d be great for web-apps that involve some sort of GPS, and can foresee the W3C adding it in the future (why not?).
But, if I understand correctly, HTML5 allows you create custom elements which may be a temporary fix for an up-and-coming web-app. Semantically I don’t think this is the greatest thing, all that extra markup to create an element, but some may use it. Eric Meyer has an article discussing custom elements.
Although, technically, I think that most browsers will render unknown markup given the proper CSS and/or JavaScript …
Answer by Starx
There is no such element called “location”.
You can show your GPS data in HTML using Google Maps API
<div id="map" style="width: 400px; height: 300px"></div>
<script type="text/javascript">
var myOptions = {
zoom: 8,
center: new google.maps.LatLng(51.49, -0.12),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
</script>