Not just the modern ones but IE7+ too.īrowsers will treat your tag as unknown and apply no default style to it. Use as many custom tags as you like, browsers will know what you mean. Good luck, would be great if we could all define our presentation schemes though, fun idea! If to present it, then you should go with the standards if you want to continue to use a browser as your rendering engine. CSS can help a browser understand what you want to do visually but ask yourself first whats the goal of having your markup that way, to store your data (XML-style) or to present it. The browser doesn't need to understand the information like a "post" or "userInfo" because it has no context for undertsanding what to do from a rendering perspective with that information. Remember that a browser is simply a rendering engine and it uses the HTML spec as it's blueprint of what to render for a given site. If that is the case, then XML with XSLT transforms on the server side to output HTML for presentation markup is best. Your tags look more like they are attempting to describe the actual data. What is the goal of the tags you chose? If your goal is to present information, then using divs and other presentation-oriented structures is great. If you really need custom tags, you can produce the document as XML with your own DTD attached, and use XSLT to transform it into a valid HTML/X-HTML document. When Javascript was first introduced, there were still MANY other browsers out there that were entirely unaware of Javascript, and so they'd ignore tags, and happily output your Javascript code. This is why Javascript and CSS had to support the opening HTML comment sequence as part of their respective language definitions: Eventually they'll reach the and ignore that as well. ![]() Then they'll happily parse away on to the next bit, and see some plain text, with a valid span inside. Within, which ends with a fake self-closing īrowsers will see, not now how to deal with it, and treat it as essentially "nothing" and ignore it. This is some test test text with another tag tag And of course, the document won't validate as proper HTML/X-HTML. You can use your own tags, but the problem is that since they're not standard, browsers won't know that they may have matching closing tags.
0 Comments
Leave a Reply. |