# Getting the Title of a web page or tab

**URL:** <https://talk.jekyllrb.com/t/getting-the-title-of-a-web-page-or-tab/6360>\
**Category:** Help\
**Created:** [August 22, 2021, 4:49pm UTC](https://talk.jekyllrb.com/t/getting-the-title-of-a-web-page-or-tab/6360 "2021-08-22T16:49:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cashfields](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/cashfields/32/3835_2.png) [@cashfields](https://talk.jekyllrb.com/u/cashfields)\
**Post date:** [August 22, 2021, 4:49pm UTC](https://talk.jekyllrb.com/t/getting-the-title-of-a-web-page-or-tab/6360/1 "2021-08-22T16:49:25Z")

</div>

I can find simple and complex examples to get the TITLE.

=============== Simple

 Tutorix ===============

I am new to github & jekyll

I have tried ALL kinds of things , nothing works.

===============Here is my default.html

```
    <head>
      
                    <title id="mywantedname">{{ page.title }}</title>
                    <!-- link to main stylesheet -->
                   <link rel="stylesheet" type="text/css" href="https://cashfields.github.io/TioCash/css/main.css"> 

```

```
     </head>

```

```
&nbsp;&nbsp;&nbsp;&nbsp;
                  <a href="https://cashfields.github.io/TioCash/index.html">Home</a>
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <a href="mailto:cashfieldsutc@gmail.com" target="_blank">email</a></li>
                  &nbsp;&nbsp;&nbsp;&nbsp;
                  <a href="https://github.com/cashfields/tiocash" target="_blank">TioCash Project</a>
	
               
                    <div class="container">

                    {{ content }}

                   </div><!-- /.container -->
                    <footer>
                
                    </footer>
            </body>
    </html>

```

===========================

What needs to be said and where does it need to be said to place the TITLE name inside the

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/e/eb27df130379fa4f72d9f93b64b7074dbc7280f8.png)

Any help will be appreciated - Thanks

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [August 22, 2021, 7:19pm UTC](https://talk.jekyllrb.com/t/getting-the-title-of-a-web-page-or-tab/6360/2 "2021-08-22T19:19:42Z")

</div>

To set a page’s title property, add it to the page’s YAML front matter. I.e. Your [`index.html`](https://github.com/cashfields/TioCash/blob/main/index.html) file should start with:

```auto
---
title: my home page title
layout: default
---
... content of page ...

```

---

<div class="post-metadata">

**Author:** ![cashfields](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/cashfields/32/3835_2.png) [@cashfields](https://talk.jekyllrb.com/u/cashfields)\
**Post date:** [August 22, 2021, 8:31pm UTC](https://talk.jekyllrb.com/t/getting-the-title-of-a-web-page-or-tab/6360/3 "2021-08-22T20:31:16Z")

</div>

Chuck

I want to dynamically place the text that is the webpage title into each webpage.  
Please see attached doc.

Thanks

**CA$H OUT**

 ![jekyll.png](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/2/2579b981efe40f1c0eb78d07679dbcdd43099945.png)

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [August 23, 2021, 3:13pm UTC](https://talk.jekyllrb.com/t/getting-the-title-of-a-web-page-or-tab/6360/4 "2021-08-23T15:13:43Z")

</div>

Do you mean the page title or URL? Browsers tab labels will display either – usually the page title, but if that is empty/undefined, the URL is displayed.

Generally, there is no need to render the Title or URL with dynamic Javascript. You can access either from the [`page` variables](https://jekyllrb.com/docs/variables/#page-variables). For example (untested code):

```nohighlight
The title of this document is: {{ page.title }}

```

```nohighlight
The absolute URL of this document is: {{ page.url | absolute_url }}

```

Note the use of the [`absolute_url` filter](https://jekyllrb.com/docs/liquid/filters/). `page.url` itself is a relative URL, so `absolute_url` is needed to combine it with `site.url` and `site.baseurl`.
