Skip to main content
Participant
August 16, 2013
Answered

Why am I getting a syntax error on the </head> line in DW CC?

  • August 16, 2013
  • 2 replies
  • 17591 views

I am getting a syntax error in DW CC.  Other threads have indicated this was a bug in CS6 but had been fixed in CC.  That leads me to believe it's my fault, but I can't figure it out.  Can anyone help based on the information I've pasted below?  Thanks!

<!doctype html>

<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->

<!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->

<!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->

<!--[if gt IE 8]><!-->

<html class="">

<!--<![endif]-->

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Untitled Document</title>

<link href="boilerplate.css" rel="stylesheet" type="text/css">

<link href="style.css" rel="stylesheet" type="text/css">

<link href="jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css">

<link href="jQueryAssets/jquery.ui.theme.min.css" rel="stylesheet" type="text/css">

<link href="jQueryAssets/jquery.ui.accordion.min.css" rel="stylesheet" type="text/css">

<link href="jQueryAssets/jquery.ui.tabs.min.css" rel="stylesheet" type="text/css">

<!--

To learn more about the conditional comments around the html tags at the top of the file:

paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/

Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):

* insert the link to your js here

* remove the link below to the html5shiv

* add the "no-js" class to the html tags at the top

* you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build

-->

<!--[if lt IE 9]>

<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->

<script src="respond.min.js"></script>

<script src="jQueryAssets/jquery-1.8.3.min.js" type="text/javascript"></script>

<script src="jQueryAssets/jquery-ui-1.9.2.accordion.custom.min.js" type="text/javascript"></script>

<script src="jQueryAssets/jquery-ui-1.9.2.tabs.custom.min.js" type="text/javascript"></script>

<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.--><script>var __adobewebfontsappname__="dreamweaver"</script><script src="http://use.edgefonts.net/adamina:n4:default.js" type="text/javascript"></script>

</head>

<body>

<div class="gridContainer clearfix">

  <div id="div1" class="fluid">

    <header id="header" class="fluid">

      <p><img src="Images/Logos/insidejoplinlogo.png"  alt=""/></p>

    

        <nav id="mainnav" class="fluid"> <ul class="fluid fluidList mainnavlist"> <li class="fluid mainnavitem zeroMargin_desktop"><a href="Index2.html" title="Inside Joplin Home" target="_self">Home</a></li><li class="fluid mainnavitem"><a href="news.html">News</a></li><li class="fluid mainnavitem"><a href="entertainment.html">Entertainment</a></li><li class="fluid mainnavitem"><a href="announcements.html">Announcements</a></li><li class="fluid mainnavitem hide_mobile"><a href="galleries.html">Galleries</a></li><li class="fluid mainnavitem hide_mobile"><a href="aboutcontact.html">About/Contact</a></li>  </ul> </nav>

     

    </header>

    <article id="indexguts" class="fluid">    <article id="indexarticle" class="fluid">

     

      <h4 class="fluid articleH4 zeroMargin_mobile">Latest News</h4>

      <p> </p>

     <div id="Accordion1">

        <h3><a href="#">Section 1</a></h3>

        <div>

          <p>Content 1</p>

          </div>

        <h3><a href="#">Section 2</a></h3>

        <div>

          <p>Content 2</p>

          </div>

        <h3><a href="#">Section 3</a></h3>

        <div>

          <p>Content 3</p>

          </div>

      </div>

     

    </article><article id="article1" class="fluid">

     

      <h4 class="fluid articleH4 zeroMargin_mobile">Latest Entertainment</h4>

      <p> </p>

      <div id="Accordion2">

        <h3><a href="#">Section 1</a></h3>

        <div>

          <p>Content 1</p>

          </div>

        <h3><a href="#">Section 2</a></h3>

        <div>

          <p>Content 2</p>

          </div>

        <h3><a href="#">Section 3</a></h3>

        <div>

          <p>Content 3</p>

          </div>

      </div>

     

    </article><article id="article2" class="fluid"><h4 class="fluid articleH4 zeroMargin_mobile">Latest Announcements</h4>

    <p> </p>

      <div id="Tabs1">

        <ul>

          <li><a href="#tabs-1">Obituaries</a></li>

          <li><a href="#tabs-2">Weddings</a></li>

          <li><a href="#tabs-3">More</a></li>

          </ul>

        <div id="tabs-1">

          <p>Content 1</p>

          </div>

        <div id="tabs-2">

          <p>Content 2</p>

          </div>

        <div id="tabs-3">

          <p>Content 3</p>

          </div>

    </div>

     

    </article><article id="indexbotleft" class="fluid">This is the content for Layout Article Tag "indexbotleft"</article><article id="article3" class="fluid">This is the content for Layout Article Tag "indexbotleft"</article></article><aside id="mainsidebar" class="fluid">This is the content for Layout Aside Tag "mainsidebar"</aside><aside id="mainsidebar2" class="fluid">This is the content for Layout Aside Tag "mainsidebar2"</aside><article id="indexbotrot" class="fluid">This is the content for Layout Article Tag "indexbotrot"</article>

    <footer id="footer" class="fluid">

    <nav id="footernav" class="fluid">

     <ul id="footernavlist" class="fluid fluidList"> <li class="fluid footernavlistitem zeroMargin_mobile"><a href="Index2.html">Home</a></li><li class="fluid footernavlistitem hide_mobile"><a href="news.html">News</a></li>

      <li class="fluid footernavlistitem hide_mobile"><a href="entertainment.html">Entertainment</a></li>

      <li class="fluid footernavlistitem hide_mobile"><a href="announcements.html">Announcements</a></li>

      

      

       <li class="fluid footernavlistitem zeroMargin_desktop zeroMargin_mobile"><a href="galleries.html">Galleries</a></li>

       <li class="fluid footernavlistitem zeroMargin_mobile"><a href="aboutcontact.html">About Us</a></li> 

        <li class="fluid footernavlistitem zeroMargin_mobile"><a href="mailto:info@insidejoplin.com">Email</a></li> <li class="fluid footernavlistitem zeroMargin_mobile"><a href="www.facebook.com/insidejoplin" target="new">Facebook</a></li></ul> 

       </nav>

       <article id="footerarticle" class="fluid"><img src="Images/Logos/insidejoplinlogo.png"  alt=""/></article>

    </footer>

  </div>

</div>

+

<script type="text/javascript">

$(function() {

          $( "#Accordion1" ).accordion();

});

$(function() {

          $( "#Accordion2" ).accordion();

});

$(function() {

          $( "#Tabs1" ).tabs();

});

</script>

</body>

</html>

This topic has been closed for replies.
Correct answer Jon Fritz

Hmm, nothing is highlighting for me, but I'm on an older version of DW, maybe it's less picky.

What happens if you ad a semi-colon right before the </script> tag in this line...

<script>var __adobewebfontsappname__="dreamweaver"</script>

2 replies

Nancy OShea
Community Expert
Community Expert
August 16, 2013

I don't know if this is the problem or not, but HTML5 doc types do not use the type attribute in scripts or styles tags.  Use <script>   instead of <script type="text/javascript">

Use <style> instead of <style type="text/css">.  This will make your code valid in HTML5.

Nancy O.

Nancy O'Shea— Product User & Community Expert
Participant
August 16, 2013

O', Nancy O!

It's so lovely to get help from a DW rock star.  Your time and efforts are appreciated greatly. 

If I may ask, why did CC use the <script type="text/javascript> and <style type="text/css"> for me?

Or, perhaps, this is something I did.  If so, I don't know what it was.  Is it because I used the Edge Font?

Humbly Yours,

Bride

Nancy OShea
Community Expert
Community Expert
August 16, 2013

I'm still using CS6 and it incorrectly inserts <script type> into HTML5 docs.   It's something I fix manually.

I don't know if CC is doing the same thing. If so, it should be reported as a bug.

Nancy O.

Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Community Expert
August 16, 2013

You have quite a few errors in that code.

Run the validator here: http://validator.w3.org/ and clean it up. Your syntax error should clear up once the code errors are taken care of.

Nevermind, I had a copy/paste issue.

Where is the error displaying (line number)?

Participant
August 16, 2013

Hello, Jon.

It's line 37.  </head>

Thank you.

Bride

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
August 16, 2013

Hmm, nothing is highlighting for me, but I'm on an older version of DW, maybe it's less picky.

What happens if you ad a semi-colon right before the </script> tag in this line...

<script>var __adobewebfontsappname__="dreamweaver"</script>