Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML h1 as html5 header ?

udin

New Coder
Hi

what is the correct formating if i wanted to mark the block of code below as a header element in html5

HTML:
<h1 class='post-title entry-title' style='margin: 10px 0;font-size: 17px;'>

                    <b:if cond='data:post.link'>

                      <a expr:href='data:post.link' expr:title='data:post.title'><data:post.title/></a>

                    <b:else/>

                      <b:if cond='data:post.url'>

                        <b:if cond='data:blog.url != data:post.url'>

                          <a expr:href='data:post.url' expr:title='data:post.title'><data:post.title/></a>

                        <b:else/>

                          <data:post.title/>

                        </b:if>

                      <b:else/>

                        <data:post.title/>

                      </b:if>

                    </b:if>

</h1>
 
Hi there,

If I understand correctly you would just need to change h1 to header. You could technically wrap the h1 with the header instead. But to just confirm my understanding, are you referring to the <headers> tag?
 
Hi there,

If I understand correctly you would just need to change h1 to header. You could technically wrap the h1 with the header instead. But to just confirm my understanding, are you referring to the <headers> tag?
yes...html5 semantic, its a post title ...but if i change h1 into <header>, then its not a h1 any longer ...?

my goal is to mark that area as an article header and h1

HTML:
<h1 header= class='post-title entry-title' style='margin: 10px 0;font-size: 17px;'> text title</h1>

wrap it like that?
 
Place the header tag before your h1 tag and end it after the last element that you want in your header. So if you only want your h1 in the header, it would look like this:

Code:
<header>
<h1 header= class='post-title entry-title' style='margin: 10px 0;font-size: 17px;'> text title</h1>
</header>
That indicated the header of your page your visible page title would be. You would then follow that with a <body> tag and include the rest of your site there, ending it with a footer tag that contains your copyrights, credits, and other links.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom