HTML5 tags are unrecognized

Posted:
Sun Jun 03, 2012 10:34 am
by Whissi
Hi,
I am using CSE HTML Validator v11.0213 within Nusphere PhpED. When I have a document without doctype like
- Code: Select all
<?php
/**
* The main template file.
*
*/
get_header(); ?>
<div id="left-col">
<section id="foo">
[...}
all the HTML5 tags are unrecognized. When I add the doctype like
- Code: Select all
<?php
/**
* The main template file.
*
*/
get_header(); ?>
<!doctype html>
<div id="left-col">
<section id="foo">
[...}
everything is ok.
So the question is:
When working with splitted up templates, the detection based on doctype cannot work... so can I force HTML Validator into HTML5 mode?
Re: HTML5 tags are unrecognized

Posted:
Mon Jun 04, 2012 5:43 pm
by Albert Wiersch
Hello,
I'm sorry for the delay. By default, HTML5 tags should be accepted & recognized, even if there is no DOCTYPE. Can you supply a small sample document where this is not the case? I'll be happy to investigate further. I could not reproduce the problem with the first example you provided as CSE HTML Validator did recognize the "section" element. If you could provide some or all of the validator messages as well, then that could also be helpful.
Re: HTML5 tags are unrecognized

Posted:
Tue Jun 05, 2012 5:28 pm
by Whissi
Hi,
as I said I am not working
in HTML Validator itself, I am using HTML Validator within Nusphere PhpEd/
- Code: Select all
<?php
/**
* The template used for displaying page content in page.php
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'basicthinking' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php // edit_post_link( __( 'Edit', 'basicthinking' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
Screencast (1mb) showing it problem.
Re: HTML5 tags are unrecognized

Posted:
Tue Jun 05, 2012 8:13 pm
by Albert Wiersch
Thanks for the screencast, but that is a PhpED function. I believe you can fix it by going to Tools->Settings and then the Code Insight->Settings page. Please try changing the "Target HTML Version" option to HTML 5.0.
Re: HTML5 tags are unrecognized

Posted:
Thu Jun 07, 2012 5:51 am
by Whissi
Hi,
Albert Wiersch wrote:Thanks for the screencast, but that is a PhpED function. I believe you can fix it by going to Tools->Settings and then the Code Insight->Settings page. Please try changing the "Target HTML Version" option to HTML 5.0.
You are right, it was PhpEd.
Thanks.