Click to See Complete Forum and Search --> : Creating html


squishy
03-24-2006, 01:14 AM
When I make up my own random tag (ex. <poopy>) and use it in a standard html file, the webbrowser does not know what to do with it so it is naturally ignored.

When I do this, can I also link in an xml stylesheet, in xslt, to tell the webbrowser how to treat the new tag.

I am not creating an xml file, persay. I am creating a new html tag to be used amongst other html tags. I simply need to define what the new tag needs to do.

Anotherwords... my html will look like this...

<html>
<head></head>
<body>
<img src="">

<RandomNewTag>
Hello World
</RandomNewTag>

</body>
</html>


and I have an xsl file that says something like....

<xsl:template match="RandomNewTag">

<table border="2">
<tr>

<td>
<xsl:value-of select="/" />
</td>

</tr>
</table>

</xsl:template>


My objective is to create and define the function of a brand new tag. Anyone can create a new tag to use in an html document, but unless that browser knows what to do with it then the tag will simply be ignored.

Is there a way of doing this? Reminder, I am not trying to create an xml file in the normal sense of the word. Simply, I am adding new tags to my html with their own predefined functions for sake of my own ease of design and coding.

NogDog
03-24-2006, 02:30 PM
No. HTML has a pre-defined set of tags. If you want to define your own tags, then you want to create an XML file.

squishy
03-24-2006, 08:51 PM
I will take your word for it that it is impossible.

I dont think this was a rediculous question though. Wouldnt it be nice if it were possible?!?! I think that this idea... this technology... would help to advance web design.

Instead of having complex repeating-pattern code, you can have simple repeating-pattern code with your own tags. With an xsl-type file, you allow the client to do the parsing...

I think this would have its advantages.