Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6113587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:52:34+00:00 2026-05-23T14:52:34+00:00

I’m on a project involving converting HTML code to HTML5, and I’d like some

  • 0

I’m on a project involving converting HTML code to HTML5, and I’d like some feedback as to whether I’m coding correctly or not.

Here’s my stripped-down code:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Title Goes Here</title>
<!--[if IE 9]>
<script src="/jsp/fileFolderPath/js/html5shiv.js"></script>
<![endif]-->

<link rel="stylesheet" href="/jsp/fileFolderPath/css/global.css">

<!--[if IE 7]> <body class="ie7"> <![endif]-->
<!--[if IE 8]> <body class="ie8"> <![endif]-->

<script src="/jsp/fileFolderPath/js/jquery-1.4.2.min.js"></script>
<script src="/jsp/fileFolderPath/js/jquery.colorbox-min.js"></script>
<script src="/jsp/fileFolderPath/js/tip.js"></script>
<script src="/jsp/fileFolderPath/js/jquery.calendar.js"></script>

<script src="/jsp/fileFolderPath/js/modernizer-2.0.6.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    $('#whatsthis').mouseover(function(){
        tooltip.show('Tooltip text goes here');
    }).mouseout(function(){
        tooltip.hide();
    });

    $('#printthis').mouseover(function(){
        tooltip.show('&lt;strong&gt;Print&lt;/strong&gt;');
    }).mouseout(function(){
        tooltip.hide();
    }).click(function(){
        printCalendar();
    });
});
</script>

</head>
<body>

    <!-- container start --> 
    <div id="container">

        <!-- header start --> 
        <header>
            <figure>
                <img src="headerImg.png" width="600" height="100" alt="header image">
            </figure>
            <div class="clear">&nbsp;</div>
            <nav>
                <!-- header code goes here - this is actually an include file -->
            </nav>
        </header>       
        <!-- header end -->

        <nav>
            <!-- primary navigation start -->
            <div class="clear">&nbsp;</div>
            test
            <!-- primary navigation end -->
        </nav>

        <!-- Application Name start -->
        <div id="applicationName">mySchedule <a href="#" id="whatsthis"><img src="images/what-this.png" width="21" height="21" alt=""></a>
            <!-- breadcrumbs start --> 
            <nav>
                <div id="breadcrumbs">
                    <ul>
                        <li><a href="#MyConnections">Home</a></li>
                        <li>&rarr;</li>
                        <li><a href="#Exhibitors">mySchedule</a></li>
                    </ul>
                </div>
            </nav>
            <!-- breadcrumbs end --> 
        </div>
        <!-- Application Name end -->

        <!-- Features Toolbar start -->
        <div id="features" class="right">
            <div class="featuresAddOn"> <a href="#" id="printthis">Print mySchedule</a></div>
        </div>
        <!-- Features Toolbar end -->

        <div class="clear">&nbsp;</div> 

        <!-- Left Side Bar start -->
        <div class="left">
            <nav>
                <!-- Application Navigation start -->
                <div id="appMenuContainer">
                    <div class="appMenu">
                        <h4 class="firstitem"><a href="/jsp/Myclients/Myclients.jsp?action=ClientMyMatchTab">Client Matching</a></h4>
                    </div>
                    <div class="appMenu">
                        <h4 id="MyClient" class="menuitem header"><span><a href="/jsp/Myclients/Myclients.jsp">MyClients</a></span></h4>
                    </div>
                    <div class="appMenu">
                        <h4 id="MySched" class="menuitem header"> <span><a style ="cursor:default">MySchedule</a></span></h4>
                    </div>
                    <div class="appMenu">
                        <h4 id="MyHel" class="menuitem lastitem"> <span><a href="/jsp/Myclients/help.jsp">Help</a></span></h4>
                    </div>
                </div>
                <!-- Application Navigation end -->
            <nav>

            <!-- Alert Box start -->
            <aside>
                <div id="AlertBox" class="margin-bottom margin-top">
                    <div class="title">Alert</div>
                    <div class="contentAlert lastItem"> You have <span class="count New_Time">0</span> New Time Proposed Notifications. </div>
                </div>
            </aside>
            <!-- Alert Box ends -->
        </div>
        <!-- Left Side Bar end -->

        <section>
            <!-- Content -->
            <div id="calendar"></div>
        </section>

        <div class="clear">&nbsp;</div>

    </div>
    <!-- container end --> 

    <footer>
        © MyCompany, Inc. 2011
    </footer>

</body>
</html>
  • Among the requirements of the project
    are that the website use HTML5, and
    support IE7, IE8, and IE9. This is
    why I’m using conditionals for the
    stylesheets. With the requirements specified, is this the correct approach?

    The html is on a jsp page, which
    contains a lot of dynamic code. I did
    not include that in the example.

    I have 3 navigational areas – one in
    the header, the dashboard (underneath
    the top header), and the side
    navigation. Do these each need ids?

    The side navigation is the same as
    the breadcrumbs – so should the
    breadcrumbs be encased within nav
    tags?

    This is one page of several. The
    content on all of the pages appears
    within the div id=”calendar” tag.
    This is dynamically replaced
    depending on the client. This page looks like a calendar/schedule, for which clients can set appointments. Other pages look like either table lists/shopping carts, or forms. Apart from updating
    the tags to HTML5, pretty much all
    content is built using divs, so I
    intend to leave them as such. I think
    they all should be encased withing
    section tags though. With this description, is it appropriate to use the section tag here?

    I encased the alert box underneath
    the left side navigation in aside
    tags. The alert box content is
    related to the calendar content – it alerts a client if an appointment has been set on the calendar – but
    wouldn’t make sense if it stood on
    it’s own. Is this correct?

BTW, I’m a web development contractor brought in on this project. So I’m basically updating existing code.

I’ve gone through other the other posts, other online references and a couple books. I think I’m on the right track. I just would like some confirmation before moving forward.

Thanks.

Stephen

UPDATE: OK. I’ve made updates to my code above based on all of the recommendations, and I ran it through a validator (successfully).

I’m still a little unsure about three things:

  1. If I understand correctly HTML5Shiv is a workaround that enables HTML5 elements in older versions of IE. Modernizr does something similar and handles HTML5 elements and CSS3. I’m not sure if this helps with the alternate stylesheets I have for IE7 and IE8. These are there for display/design issues, so I believe I need to continue to refer to them until the code that uses those classes is updated. They have nothing to do with CSS3 specs.

  2. Saeed mentioned using the figure tag. Had to look that one up. The first image I’m using is the header logo, which is on all pages. So, that sounds like that tag would work for the header logo. Alternately, I wouldn’t use it for, say, the help link (what-this.png), which is just a question mark icon. Correct?

  3. Regarding the header and footer, the reason I put the divs inside the tags was because there are styles attached to them. Since I removed them, I’ll now add the styles to the header and footer tags. Is that the correct way to do this? If not, where do the styles go?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:52:35+00:00Added an answer on May 23, 2026 at 2:52 pm

    Here is the list of recommendations:

    1. Don’t use <div id='header' /> inside <header>, because it ruins the purpose of being semantic
    2. It’s better to use a library to query the capabilities of the current browser (I strongly recommend Modernizr).
    3. Use HTML5Shiv (Google it) to make IE8- understand about HTML5 elements (it’s a hack)
    4. Put your <img> tags inside a <figure> tag.
    5. User <nav> wherever you have a list of links. It’s the navigation element’s purpose.
    6. Use Level 2 of DOM events (use something like jQuery, or addEventListener instead of onmouseout attribute, for example)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I have some data like this: 1 2 3 4 5 9 2 6
I have just tried to save a simple *.rtf file with some websites and
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.