# Document titles

**URL:** <https://talk.commonmark.org/t/document-titles/649>\
**Category:** Extensions\
**Created:** [September 20, 2014, 12:28am UTC](https://talk.commonmark.org/t/document-titles/649 "2014-09-20T00:28:37Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![mofosyne](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [September 27, 2014, 11:40am UTC](https://talk.commonmark.org/t/document-titles/649/21 "2014-09-27T11:40:07Z")

</div>

# Document title

I agree with kagan, that a run of spaces before a word as first or second line is probably a title, and should be auto recognised as such. And treated as `<h1>`. As for why? It’s because I would hate to have to keep typing `##` throughout the entire document (As you would see in my metadata via `|` example below)

e.g.

lazy headers (only works if you add enough spaces)

```
                 Blogging Like a Hacker

| title: This is a title

... intro ...

# My First Chapter

## Level two header

Lorem ipsum (TBC)

```

or ( typical markdown Setext-style headers. Recall that `===...` is h1 and `---...` is h2 ). Not sure if this is a good idea, since it’s not immediately obvious that it is a document title, since it is typically used for subheadings.

```
Blogging Like a Hacker
=======================
| title: This is a title

... intro ...

# My First Chapter

## Level two header

Lorem ipsum (TBC)

```

or ( non-standard Setext-style headers, but specifically used to demarcate document titles). Babelmark2 shows that `###...` is not supported anywhere, so is a good candadate for document title declaration [babelmark2](http://johnmacfarlane.net/babelmark2/?normalize=1&text=%0Ahello+world%0A%23%23%23%23%23%23%23%23%23%23%23%23%23%23) :

```
#################################################
            Blogging Like a Hacker
#################################################
| title: This is a title

... intro ...

# My First Chapter

## Level two header

Lorem ipsum (TBC)

```

is rendered as (note: [usage of header tag](http://www.w3schools.com/tags/tag_header.asp) ):

```
<head>
    <title>This is a title</title>
</head>
<body>
   <header>
    <h1>Blogging Like a Hacker</h1>
    <p>... intro ...</p>
   </header>
   <main>
    <h1> My First Chapter </h1>
    <h2> Level two header </h2>
        <p>Lorem ipsum (TBC)</p>
   </main>
</body>

```

# Metadata

Moved to

[http://talk.commonmark.org/t/metadata-in-documents/721](http://talk.commonmark.org/t/metadata-in-documents/721)

---

_[View the full topic](https://talk.commonmark.org/t/document-titles/649)._
