PDA

View Full Version : User Defined HTML Tags


oldcrazylegs
06-08-2007, 08:53 PM
I read in a book and on this page http://drn.digitalriver.com/product.php[id]24741[cid]152[SiteID]softwareoasis/ about user defined HTML tags.

The book says to do it this way. But it didn't work for me.


<style ty=text/css">
footer {
font-family:arial,san-serif;
{
</style>

<footer>this is a test</footer>


Have you ever heard of this? Do you know how to make it function? I thought you could only do that in XML.

ess
06-08-2007, 09:28 PM
XML yes.
HTML no.

XML is built specifically to allow users to built or define their own document structure. as for html, I am afraid you cannot do that as far as I know...and looking at the w3c...does not suggest that you can

sdcomputerz
06-08-2007, 09:36 PM
You might try this:


<style ty=text/css">
#footer {
font-family:arial,san-serif;
{
</style>

<div id="footer">this is a test</div>

felgall
06-09-2007, 02:04 AM
The version of HTML that you need to use if you want to define your own tags is called XML. You then need to feed that through an XSL stylesheet to generate HTML from it. The easier way is to just define the equivalent HTML yourself the way that sdcomputerz suggested.

Bill Posters
06-09-2007, 07:50 AM
The version of HTML that you need to use if you want to define your own tags is called XML. You then need to feed that through an XSL stylesheet to generate HTML from it.
Alternatively, you could create a brief and simple PHP5-based parser using simpleXML (http://uk.php.net/simplexml) and a foreach loop.

There are also similar (though slightly more complex) options for those using PHP4.

...for example.

oldcrazylegs
06-14-2007, 10:37 PM
thanks for the help. it thought it had to be wrong. i have read so many web design books where the author didn't have a clue what he was writing about.

joe burns site html goodies is a fairly good beginner's site. but everything in his book was wrong. even whole pages were missing and parts of the examples. it was pathetic. :) i think he probably gave the job to some writer and the two didn't confer while the the book was being written.

felgall
06-14-2007, 11:27 PM
Joe Burns wrote HTML Goodies after learning by trial and error as to what code worked in version 3 browsers. About 50% of the information is proprietary to specific browsers or obsolete or wrong. Just about any other HTML tutorial site would be a better choice for learning HTML.

whizard
06-15-2007, 12:05 AM
Even though Joe Burns may be behind the curve now, there was a time (*shudder*) when he was a very helpful resource. I learned a lot from his materials when I didn't have a clue (the more things change, the more things stay the same.. :p ), and he was very good at making things very simple and easy to understand for a complete beginner, who was looking for a tutorial on how to get three scripts from dynamic drive to work together on one page

:rolleyes:

Joe Burns was a good source of info at a certain point in time, and I don't think it is really neccessary to put him down just because his early 2000's advice is out of date in the modern webdev world.

Dan

felgall
06-15-2007, 03:26 AM
It was not my intention to put him down, just to point out that much of his information is now very dated and no longer useful. I spent a lot of time looking up answers to HTML questions either on his site or in his book (which I bought) back when I was first starting to learn HTML. It is unfortunate that he decided to sell his site rather than staying involved and updating it as there are few sites around that have such good teachers as Joe.

whizard
06-15-2007, 03:43 AM
Actually my post was more directed at the OP than you.

:thumbsup:

Dan

felgall
06-15-2007, 04:13 AM
He must have got a badly mangled copy of the book. Most of the content in my copy matched exactly to what was on the web site at the time. Perhaps the biggest problem with that book was that it was somewhat disjointed because of being a collection of web pages printed in book form rather than being written as a book in the first place.

Arbitrator
06-15-2007, 01:15 PM
<style ty=text/css">
footer {
font-family:arial,san-serif;
{
</style>

<footer>this is a test</footer>


Have you ever heard of this? Do you know how to make it function? I thought you could only do that in XML.Technically, that should work in HTML, although your HTML document would become non‐conforming (HTML live example (http://www.jsgp.us/demos/CF115969.html)). Perhaps it doesn’t work due to a syntax error in the attribute syntax. The correct syntax is shown below.

<style type="text/css">

Of course, since that violates the HTML 4.01 specification, you shouldn’t do it. You can still make up elements in XHTML (XHTML live example (http://www.jsgp.us/demos/CF115969.xhtml)) and XML (XML live example (http://www.jsgp.us/demos/CF115969.xml)) though. Unfortunately, the former isn’t supported by Internet Explorer and the latter produces an incorrect rendering in that same browser.

You could also wait for the HTML5 footer element (http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sections.html#the-footer).

I learned a lot from his materials when I didn't have a clue…Same here. I learned basic HTML and CSS from his HTML Goodies Web site around seven or eight years ago. I gave up on it when he left and they changed the site to that corporate zombie layout though.

whizard
06-15-2007, 02:32 PM
I gave up on it when he left and they changed the site to that corporate zombie layout though.

When he left, the magic left with him. Also, I know exactly what you mean about the website! I had dial up, and I really couldn't use the website, whether I wanted to or not, because it took forever to load!

Dan