Grow your CSS skills. Land your dream job.

Which HTML5 markup is more semantically correct?

  • # July 18, 2013 at 8:56 pm

    Let’s say you have a header that needs a wrapper/container. Within the header, you have the logo on the left and the login menu on the right. Which way is _more_ semantically correct?

      or…

        # July 18, 2013 at 9:23 pm

        I think you intended to post some code but it didn’t work. Try editing your post

        __
        # July 18, 2013 at 9:24 pm

        @hoff331

        highlight your code and click the button, or, indent your code four spaces (or one tab).

        This:
            This is some code

        becomes this:

        This is some code

        *****
        To give a general answer to your question, “left” or “right” doesn’t really matter. Start with a document outline. If each item were on its own line, would it matter which came first? Which makes more sense to you (or does it matter at all)?

        a)

        header
            logo
            login
        body

        b)

        header
            login
            logo
        body

        Without knowing any more, I would probably suggest something like

        My Heading

        my logo

        Log In




        [code] button, or, indent your code four spaces (or one tab).

        This:

            This is some code

        becomes this:

        This is some code

        *****
        To give a general answer to your question, “left” or “right” doesn’t really matter. Start with a document outline. If each item were on its own line, would it matter which came first? Which makes more sense to you (or does it matter at all)?

        a)

        header

            logo

            login

        body

        b)

        header

            login

            logo

        body

        Without knowing any more, I would probably suggest something like

        My Heading

        my logo

        Log In




        # July 19, 2013 at 12:13 am

        Why do you have an image in there? Wouldn’t you just CSS the H1 to show the logo?

      Viewing 4 posts - 1 through 4 (of 4 total)

      You must be logged in to reply to this topic.

      *May or may not contain any actual "CSS" or "Tricks".