Page 1 of 3

converting custom templates to html5

Posted: Wed 13 Aug 2014 2:45 am
by ace2
Is it worth converting custom templates to be compatible with html5?
What is required to be changed or is it too hard??

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 5:52 am
by sfws
ace2 wrote:Is it worth converting custom templates to be compatible with html5?
HTML5 adds some extras that can be useful for more specialist web pages.
e.g. '<video> ... </video>', '<audio> ... </audio>' and various alternatives to '<div> .... </div>' like '<article> ... </article>'

But if you do not need to use those, then the only reason to convert is to use the modern syntax just because it is the modern 'standard'.
ace2 wrote:What is required to be changed or is it too hard??
At its simplest, all you do is to change the first few lines of each HTML file:

Code: Select all

<!DOCTYPE html>
<!-- the above must be on the first line by itself and tells the browser that HTML 5 applies -->
<html lang="en"><!-- modify this if you are not using English language -->
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8"><!-- assigns the recommended standard encoding -->
        <meta name="description" content="<#location> weather data">
        <meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station">
        <title><!-- insert here what is to appear in browser tab title --></title>
        <link href="weatherstyle.css" rel="stylesheet"> <!-- This line links the standard Cumulus stylesheet
 to the HTML page and implies the HTML and CSS files are in the same web site directory -->
</head>
<body> <!-- This defines the start of what the browser is to display in its window -->
see http://wiki.sandaysoft.com/a/Customised_templates for relevant Wiki article

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 6:16 am
by duke
Here is a comprehensive article for you on the history of HTML5 and also the future proposed 5.1 and 5.2, My personal answer is yes and also use the correct semantics.

And of course, back up and validate your pages as you modify them:
http://html5.validator.nu/ and http://www.w3schools.com/website/web_validate.asp

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 6:22 am
by ace2
sfws wrote:HTML5 adds some extras that can be useful for more specialist web pages.
e.g. '<video> ... </video>', '<audio> ... </audio>' and various alternatives to '<div> .... </div>' like '<article> ... </article>'

But if you do not need to use those, then the only reason to convert is to use the modern syntax just because it is the modern 'standard'.
Thanks for that info, my main concern is that I used a HTML5 checker on my pages, it came up with hundreds of error to make in compliant.
So if I don't really require those special features, then I don't need to worry about it.

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 6:48 am
by steve
Your pages already have lots of errors (not criticising, just pointing it out), so it seems to me that you may as well make the change to HTML5 and then make them validate? Either way, you really should look at correcting at least the most serious of the errors which might cause the pages not to render correctly in some browsers.

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 6:57 am
by ace2
steve wrote:Your pages already have lots of errors (not criticising, just pointing it out), so it seems to me that you may as well make the change to HTML5 and then make them validate? Either way, you really should look at correcting at least the most serious of the errors which might cause the pages not to render correctly in some browsers.
Yep, I've been slowly weeding them out, but means changing so much.

Maybe i should take the approach of starting with the new templates and adding in my custom stuff while editing it......

Just seems like so much needs to be changed to suit................

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 7:20 am
by duke
The errors on your pages may prevent some browsers from delivering your page as you intended and should therefore be corrected first.

Also, from a quick glance most of these will have no effect on converting to html5 anyway and need rectifying for whatever you validate your page as.

Once you get started using the validater, those errors should not take long to rectify (I have not looked at your other pages for error count).

Re: converting custom templates to html5

Posted: Wed 13 Aug 2014 9:10 am
by ace2
Let the fun begin

Re: converting custom templates to html5

Posted: Thu 14 Aug 2014 10:01 am
by ace2
Attempted to fix errors on my index page, every time I fixed one, it would create more!!!

Looking for a better HTML editor than notepad++???

I take it general errors from script are considered normal.

I started with a fresh template and started addind what I had in the custom ones.
http://www.users.on.net/~ace2/templates/about.htm
Still have the bottom section to do....

Just wish there was a easier HTML editor

Re: converting custom templates to html5

Posted: Thu 14 Aug 2014 10:33 am
by water01
I use Webuilder 2014, not free, but very, very good. Supports HTML, PHP, Jscript, Ruby, HTML5 and CSS3 and many others and contains Validation tools and debuggers.

See here http://www.webuilderapp.com/

Re: converting custom templates to html5

Posted: Thu 14 Aug 2014 11:37 am
by sfws
See http://www.htmlkit.com/download I use its free obsolete version
HTML-Kit 292
as it will batch edits and apply them to all the files in a folder according to a filename match using wildcards; that feature may no longer be easy to find.

I do use Notepad++ for minor edits to all types of files.

Re: converting custom templates to html5

Posted: Thu 14 Aug 2014 1:49 pm
by ace2
Before I posted the wrong site address I started editing
Correct one is. http://users.on.net/~ace2/index3.htm

Re: converting custom templates to html5

Posted: Thu 14 Aug 2014 3:58 pm
by duke
Chris, I thought the point of this thread was that you were wanting to convert your templates to html5?

At the top of your template you have:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
For html5 you should simply have:

Code: Select all

<!DOCTYPE HTML>
nothing else. If you had (have?) been validating your pages as you go you would note the validater shows what the template is being checked as. I your case
iso-8859-1 Doctype: XHTML 1.0 Transitional
Here is the link for you: Aces index page

May I also suggest you take this opportunity to change the character set to UTF-8.

Code: Select all

<meta charset="UTF-8">
I take it general errors from script are considered normal.
I would think not.

If you are serious about writing web pages my vote goes to WeBuilder 2014 too. If you set your router up correctly you can validate your templates on your desk top without having to ftp them somewhere.

Also, take a look at the XAMPP web server if you have not done so already.

Re: converting custom templates to html5

Posted: Thu 14 Aug 2014 5:32 pm
by duke
And it's really frustrating when people make a post and then delete it!

Re: converting custom templates to html5

Posted: Fri 15 Aug 2014 12:40 am
by ace2
Sorry I realised I had made a mistake.....