Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<header> tag not recognized in eclipse

I'm facing awkward scene here. I'm working on phonegap (cordova) 2.5.0 app and coding it in Eclipse. I want to use <header> tag to set some heading text.

<div id="headerdiv">
        <header>
        <h1>The Heading</h1>
         </header>
    </div>

But eclipse is showing cross icon saying

Multiple markers at this line
- Warning: discarding unexpected <header>
- Error: <header> is not recognized!

The html is properly structured and no brackets or closing tags are missed out. And the same code is error free if in Dreamweaver CS6. What does this mean?

like image 589
Sujit Y. Kulkarni Avatar asked Mar 23 '23 18:03

Sujit Y. Kulkarni


1 Answers

Header is an html5 element... does your html file start with the following?

<!DOCTYPE html>

(So that Eclipse knows it is a html5 format to do proper validation)?

like image 126
Simon Arsenault Avatar answered Mar 31 '23 20:03

Simon Arsenault