Are there any reason not to use any level header for notebook titles? As described in this topic only level 1 header changes the title now.
Hi Anatoli, can you describe what youāre trying to achieve?
Currently, you can set custom URLs and custom thumbnails, and you can style the h1 tag however youād like (as described in that thread you linked to) ā but the <h1>
is the only way to set the notebook title.
I didnāt work here when that decision was made; I imagine the reason was the simplicity of matching the notebook metadata to the semantics of the HTML in the notebook. (If it could be based on <h2>
tags, I imagine more ambiguity about which tag corresponds to the title, or more steps in the publishing workflow.) It has worked well for me, but of course there are cases it doesnāt cover, so let me know what youāre going for!
I donāt like the default overcapitalization of <h1>
tag, therefore I use less screaming headers. I thought that the first title found is used. But recently discovered that my notebooks are Untitled because of that.
Ah, so like itās too big? You can make the <h1>
any size youād like; e.g., <h1 style="font-size: 1.5em;">My Chart Title</h1>
makes it the same size as our standard <h2>
, with the advantage of being semantically clearer about being the topmost title.
If you want to do this on all your notebooks, you could make a style cell that you import into every notebook, like:
style = html`<style>
h1 {
font-size: 1.5em;
}
</style>`
If the url of that is @abitrolly/style
, you can import it like:
import {style} from "@abitrolly/style"
And then apply the styles by rendering style
in a new cell:
style
(Itād be nice if you could make your default new notebook include that, which is something we sometimes talk about, but for now itās a couple manual steps each time.)