4 Replies Latest reply on Jan 22, 2011 11:29 PM by fiangotech

    Html 5 usage

    jimfid45 Level 1

      You can then say inside an html file


      <div id=nav>

      something goes here



      So now in html 5 you have this thing called navigation

      Inside an html 5 file you find very simply



      something here



      So where does navigation get its style from?


      Is navigation a keyword?


      You can just use the word navigation?


      How would a very simple html 5 file use navigation including some very basic css?




        • 1. Re: Html 5 usage
          jimfid45 Level 1

          I meant to include at the top this and this being for html 4


          some css file has




          Something here


          • 2. Re: Html 5 usage
            .V1 Level 5

            It's actually called the nav element, not navigation. And you can apply styles to it just like would style any other element, let say, div's or b tags.


            Example markup





            Example style:


            nav { display:block; width:960px; height:25px; background:red }
            nav li { float:left; background: yellow }

            • 3. Re: Html 5 usage
              jimfid45 Level 1
              Hi thanks for replying. This actually brings up a bigger issue for me.

              See below:

              <p>In <cite>Example One</cite>, he writes <q>The man
              said <q>Things that are impossible just take longer</q>. I
              disagreed with him</q>. Well, I disagree even more!</p>

              Taken from:

              I guess to a purist there is an exacting way to create markup, but think
              about news websites that change info say every hour?

              How can anyone create semantic 5.0 markup in the real world?

              What would be the goals? Are these pages supposed to be like works of art?

              Arnout since you did answer the question I just wonder what you think about this in general?

              • 4. Re: Html 5 usage

                You can actually assign an id to the nav element just as you used to do with the div element prior to html 5


                prior to html 5:

                <div id="nav1">


                In html 5:

                <nav id="nav1">


                You are basically replacing the div with the new html 5 structures, nav, section, article, and so on.....


                Note, that using the div element for your navigation is valid in html 5 also but nav is recommended