Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Converting HTML4 header into HTML5?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #152115
    tomasz86
    Participant

    This is a very simple question.

    Here’s the current code (example):

    <ul id="nav">
        <li><a id="a" href="#">a</a></li>
        <li><a id="b" href="#">b</a></li>
        <li><a id="c" href="#">c</a></li>
        <li><a id="d" href="#">d</a></li>
        <li><a id="e" href="#">e</a></li>
        <li><a id="f" href="#">f</a></li>
    </ul>
    <h1>something</h1>
    

    and after “conversion”:

    <header>
        <nav>
            <ul id="nav">
                <li><a id="a" href="#">a</a></li>
                <li><a id="b" href="#">b</a></li>
                <li><a id="c" href="#">c</a></li>
                <li><a id="d" href="#">d</a></li>
                <li><a id="e" href="#">e</a></li>
                <li><a id="f" href="#">f</a></li>
            </ul>
        </nav>
        <h1>something</h1>
    </header>
    

    Is it really worth it to add the header and nav tags purely for semantic reasons?

    CSS is exactly the same in both cases ( I don’t want to remove the #nav id from ul and use header ul instead as the former is more efficient when it comes to performance).

    #152116
    Paulie_D
    Moderator

    Nope…you’re fine either way.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.