Despite having

<title>Threatened Ecosystems of South Africa</title> 

in the html file, the Open Layers map does not include a title like Leaflet does. Is there some way around this, or is this just how it is unfortunately?

  • Please be more specific: Where do you want a title to appear? What are your settings regarding this? Which version? Aug 24, 2017 at 8:31

2 Answers 2


If you edit the index.html file that qgis2web produces you'll see the title tags in the head section of the file.

<title>This is an OL3 map</title>

The text between the tags is displayed on the tab on your browser.

Firefox tabs

Chrome tabs

IE11 tabs

If you want a title on the map itself then you need to add some text in the body section of index.html

<body> <h1 align=center>This is an OL3 map</h1> <div id="map">

title in body section

  • 1
    Ha! Beat me to it, Tom. Aug 24, 2017 at 9:46

It is just how it is at the moment, I'm afraid. Leaflet has a built-in method for adding the title to the map, but OpenLayers does not. It can be developed, and there is an existing issue on Github which includes this:


In that comment, Ola's code is the way to tackle this: place a <div> within the <map>, and then use CSS to style it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.