How can I fix the content of the title tag in order to make 'DOC' appear above the navlinks?

The content of the <title> tag can’t be shown on the page itself, it is only shown in the title bar at the top of the browser window. That’s why the <title> you have in there right now isn’t showing on the page. It’s not doing anything really. It is basically being thrown away by the browser.

It sounds like you want to put a heading above the nav links? So you could just change that to an <h2> but I’m not sure the heading “DOC” really makes sense here. A heading for this nav menu might be something like “Table of Contents”. It should describe the content that follows.

I have changed some details in CSS and now ‘Table of Content’ is apparent in my page, however it is not aligned with the navbar content.

Let me ask you this. What is the reason for the padding you have on the <header>?

Also, generally you would have the <nav> inside the <header>, not the other way around.

See my comments in the other thread you started about this:

Hello afaelleduarte1993,

You have wrapped the header tag around the h2 tag which has very high padding.

padding: 20px 200px 7px 320px;

Removing it will fix it to some extent.

Thank you.

Is there another way to fix the problem without changing code? Removing the padding culminates in the content of the page being partially hidden by the navbar.

You don’t have to remove the padding. What I would do is, remove the header wrapped around ‘h2’ tag (see line 7 in your html).

<header><h2>Table of Content</h2></header>
<h2>Table of Content</h2>

Whenever I do what you have mentioned, the test bar states: " The navbar element should contain one “header element which contains text that describes the topic of the technical documentation”.

Ok understood. maybe you can alter the padding then.

You can add a new class to h2 similar to
<header class='padding'><h2>Table of Content</h2></header>
and target the class in css using the below style:

.padding {
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.