PDA

View Full Version : html5 includes


edbr
01-09-2013, 07:44 AM
although not strictly true i came across this while yahoogling so thought id post it

<object name="foo" type="text/html" data="foo.txt"/>or
<object name="foo" type="text/html" data="foo.inc"/>
will include a file so if the contents is of foo.inc or text is

<p> This is an HTML paragraph </p>
it will return This is an HTML paragraph, similar to php includes in that way so a great way to include your repeatable items such as menu header, footers. borwsers must suppory html5 and pages must be declared
<!DOCTYPE html>
<html>

Corrosive
01-10-2013, 08:16 AM
although not strictly true i came across this while yahoogling so thought id post it

<object name="foo" type="text/html" data="foo.txt"/>or
<object name="foo" type="text/html" data="foo.inc"/>
will include a file so if the contents is of foo.inc or text is

<p> This is an HTML paragraph </p>
it will return This is an HTML paragraph, similar to php includes in that way so a great way to include your repeatable items such as menu header, footers. borwsers must suppory html5 and pages must be declared
<!DOCTYPE html>
<html>

That's useful to know, thanks Ed. HTML5 keeps throwing up some really nice surprises :)

edbr
01-10-2013, 08:28 AM
i know im trying to work with apps and am juggling between native android and html5 apps, its driving me insane