Click here to Skip to main content
Click here to Skip to main content

Introduction to VML

By , 16 Jan 2002
 

Introduction

When I first started playing around with HTML, I couldn't understand why there was no functionality to draw shapes and non-horizontal lines. It was only a couple of years later that I discovered VML (soon to be replaced by SVG). Don't get me wrong, HTML is an incredibly powerful GUI tool, but with the advent of vector graphics for the web, its power grows exponentially.

Overview

VML (vector markup language) is the technology that allows developers to draw directly onto an HTML page as if it were a GDI canvas. The syntax is made up of 2 parts: markup and code. These are mutually exclusive. Unfortunately, possibly due to a very slow adoption rate, the VML object model is poorly documented and rarely used in samples (here too). In order to use VML, you need to ensure that the IE5.0 install included the VML plugin. Here's a really basic VML shape.

Want to get a complete sample going on your machine? Firstly, you'll need to "import" the namespace into you HTML page:

<html xmlns:v="urn:schemas-microsoft-com:vml">

Next, you'll need to add a new behaviour to the page:

<style>
	v\:* { behavior: url(#default#VML); }
</style>

That's it. It won't do anything, but it makes your page VML-aware. This base code will be presumed for the rest of examples. Try adding this anywhere within the <body> tag:

<v:roundrect style="width:150pt;height:50pt"/>

Note that valid XML syntax applies. If you don't adhere to this axiom, then the page could display unpredictably and make debugging very tedious. The actual VML markup is pretty self-explanatory and human-readable (a general goal of the XML standard). Note the v: tag-prefix, this specifies to the IE rendering engine that the roundrect tag in this case is to be handled differently to other tags.

Detailed view:

So, what's the point? One of the advantages of VML is its minute size when compared to images. Depending on the type of webplications you design, this could be reason enough. Also:

  • ability to alter styles(colors, etc...) at after-load time.
  • ability to engage dynamic scripts. (explained later)

So, hopefully, you can see that VML is more than just a distorted 1x1 pixel image. Here's the code for the famous diagonal line that I wanted to do in HTML for so long:

<v:line from="10,10" to="100,100"/>

The code is really neat and simple (albiet for simple shapes). For this type of shape, a from(x,y) to(x,y) co-ord syntax is used. The above samples are probably enough for most simple web graphics, but let's dive into some more.

Try this:

<v:oval style="position:absolute;top:100;left:100; width:150pt;height:50pt" fillcolor="green"/>

Same concept, just a different shape. Note the all too familiar style tag attributes.

Here's a sample that uses a bunch of different shapes.

<v:line strokecolor="red"
   strokeweight="2pt"  from="100pt,100pt" to="200pt,150pt">
   <v:stroke endarrow="diamond"/>
</v:line>
 
<v:line strokecolor="yellow"
   strokeweight="2pt"   from="100pt,100pt" to="50pt,100pt" >
   <v:stroke endarrow="classic"/>
</v:line>
 
<v:line strokecolor="blue"
   strokeweight="2pt" from="100pt,100pt" to="120pt,120pt" >
   <v:stroke endarrow="block"/>
</v:line>

<v:line strokecolor="black"
   strokeweight="2pt"  from="100pt,100pt" to="150pt,200pt">
   <v:stroke endarrow="none"/>
</v:line>

<v:line strokecolor="green"
   strokeweight="2pt"  from="100pt,100pt" to="200pt,85pt">
   <v:stroke endarrow="oval"/>
</v:line>

<v:line strokecolor="green"
   strokeweight="2pt"  from="100pt,100pt" to="200pt,100pt">
   <v:stroke endarrow="open"/>
</v:line>

<v:oval style="width:100pt; height: 50pt" fillcolor="pink" />

<v:curve from="10pt,10pt" to="100pt,10pt" control1="40pt,30pt" control2="70pt,30pt"></v:curve>

<v:rect id=myrect fillcolor="red" 
   style="position:relative;top:100;left:100;width:20;height:20;rotation:10">
</v:rect>

As foreign as it seems (to most), using comments in HTML might be a really good plan here.

One of the awesome things about VML as a graphics tool is that ALL paint events are handled for you. Try minimising the browser or "un-maximise" it and move a part of it off the edge of your screen and out again. It repaints on it's own - and with no noticable performance penalty! This is a massive bonus for those graphics guys out there.

What about a real world use? Here's the output from a graphing engine I supposedly work on during bouts of insomnia.

A huge bonus that this approach has over the standard "let-the-server-make-a-gif" idea, is that the client (browser) can alter the shapes at the client's will. I achieve this by giving each applicable shape an id and use inline event-handlers to setup how mousedown, mousemove and mouseup events are handled. After that it's just a matter of implementing a bit of drag-and-drop code. So, put another way, VML shapes are still objects as far as JScript/VBScript is concerned.

The other technique that you can use to draw shapes is co-ordinate pairs. This can be a lot trickier to code by hand, but does gives you (virtually) unlimited power over your web presentation.

Here's an example:

<v:polyline points="5pt,10pt 15pt,20pt 100pt,50pt 50pt,100pt 5pt,10pt"/>

Conclusion & Call to action

Currently, the SVG specification is set to overtake VML and will eventually be supported natively by the main browsers. But in the meantime, VML is easy to use and can offer a new avenue of expression for lowly web developers.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

SimonS
Web Developer
South Africa South Africa
Member
* Visual C# MVP 2004, 2005 - South Africa
* SADeveloper.NET User Group co-founder and lead 2003, 2004, 2005
 
MSN : simon_stewart AT hotmail.com
Email : simon AT brokenkeyboards.com
Skype: brokenkeyboards
CEO of Broken Keyboards Software



Founder of these startups:


Browse This For Me


Monitor My URL



My full CV can be download here in PDF format.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralVML not working in aspx page.memberexploreworld24 Oct '09 - 8:38 
i've used VML in my aspx page but not working not getting where i am wrong please figure me out.
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head runat="server">
      <title>Untitled Page</title>
</head>
<style>
v\:*
            {
                  behavior: url(#default#VML);
                  width:450px;height:350px; border:solid 1px gray;
         }
</style>
<body>
      <form id="form1" runat="server">
      <div>
      <v:roundrect arcsize="0.05">
      ldksjflksdjf
      </v:roundrect>
      </div>
      </form>
</body>
</html>
QuestionVML in javascriptmembersabhandari3 Oct '07 - 6:14 
Hi,
 
I am generating a popup window from a javascript function. In the popup, i want to show some boxes joined by lines. I have drawn the boxes using the div objects (setting their border, width and height properties). All this being done using javascript. I then generate the nodelist(in VML) for the lines. Afterwards, I append this list to another dummy div object which updates its innerHTML property. But the lines are nowhere on the screen.
 
Here is what I am trying to do..
 
modalDialogWindow.document.write('
');
 
modalDialogWindow.document.write("var f=document.createElement('');");
modalDialogWindow.document.write("var s=document.createElement('v:stroke');");
 

modalDialogWindow.document.write('s.endcap="Round";');
modalDialogWindow.document.write('f.appendChild(s);');
modalDialogWindow.document.write('f.id="line" + id;');
modalDialogWindow.document.write('f.strokecolor = "gray";');
modalDialogWindow.document.write('f.fillcolor="red";');
modalDialogWindow.document.write("f.strokeweight = '3px';");
modalDialogWindow.document.write("f.style.position = 'absolute';");
modalDialogWindow.document.write("f.style.cursor = 'hand';");
modalDialogWindow.document.write('f.zIndex = 1;');
modalDialogWindow.document.write('f.from = 20+","+50;');
modalDialogWindow.document.write('f.to = 100+","+150;');
modalDialogWindow.document.write('idOutput.appendChild(f);');
 

modalDialogWindow is the object holding the popup window.
The last line of above code updates innerHTML of idOutput(I have verified by using alert()). But no line is being drawn on the screen.
 
Any suggesstions about how to go about that?

 
Sandeep
GeneralVML &amp; Netscapesussvu hai yen6 Dec '04 - 15:09 
I wan't to ask about VML run or not in Netscape, Mozila...?
Who know this, help me!

GeneralRe: VML &amp; NetscapememberDmitry Khudorozhkov10 Jul '06 - 5:04 
Currently, VML is Microsoft-only tech, supported only through MS IE.
SVG is the web standard now, supported by Mozilla.
 
-------------------------
Don't worry, be happy Blush | :O )
GeneralOn Dragsussvu hai yen5 Dec '04 - 20:50 
Before I can drag to draw a rectange on an image which is created by image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)
But now I only do that on some computers and can't do that with another computer. I wonder how?
In my computer I can't do that and I replace the image.aspx by an image.gif that becomes ok, drag well. I don't know how to do!Help me
 

GeneralRe: On DragmemberSimonS5 Dec '04 - 20:58 
Are you trying to drag on a web page?
 
Where does VML come into this?
 
Cheers,
Simon
 
sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.

article :: animation mechanics in SVG blog:: brokenkeyboards
"It'll be a cold day in Hell when I do VB.NET...", Chris Maunder

GeneralRe: On Dragsussvu hai yen5 Dec '04 - 22:03 
<HTML xmlns:v="urn:schemas.microsoft.com:vml">
<HEAD>
<title>Map</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<style> v\:* { BEHAVIOR: url(#default#VML) } </style>
<script language="javascript">
......
<IMG id="map" src="image.aspx" runat="server" style="LEFT: 0px; POSITION: absolute; TOP: 0px">




 

GeneralRe: On DragsussAnonymous31 Aug '05 - 16:17 
yyh
GeneralVML - drag and dropsussVML-Newbie26 Jan '04 - 22:34 
How do you add drag and drop functionality to VML objects ?
 
What I would like to do is to drag VML objects to new positions (x,y), and then save the new positions.
 
I have not found any code examples that do this. Hope anyone can help.
GeneralRe: VML - drag and dropmemberSimonS27 Jan '04 - 4:45 
I haven't done drag-drop in VML.
 
But, I would really strongly recommend that you move to SVG.
It's a much stronger standard and you'll find a lot more examples/support on the web.
 
Here's a drag-drop example for SVG (http://www.protocol7.com/experiments/).

 
Cheers,
Simon
 
sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.

article :: animation mechanics in SVG     blog:: brokenkeyboards

GeneralRe: VML - drag and dropsussvu hai yen7 Dec '04 - 16:25 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:v="urn:schemas.microsoft.com:vml">
<head>
<title>warp</title>
<style> v\:* {behavior: url(#default#VML);}
</style>
<SCRIPT>
I=new Array(2)
openfile=new Array("","");
ready=false
started=false
running=true;
count=0
colors=new Array("#ee22cc","#22ccee","#ccee22","#66dd66")
I[0]=new Image;
I[0].onload=start
I[0].src="a1.jpg"
function point(x,y){
this.x=x;
this.y=y;
}
function rect(p1,p2){
this.num=count;
this.l=Math.min(p1.x,p2.x)
this.r=Math.max(p1.x,p2.x)
this.t=Math.min(p1.y,p2.y)
this.b=Math.max(p1.y,p2.y)
}
function enable(){
document.getElementById("IQ").ondrag=drawrect;
PQ=new point(window.event.x,window.event.y)
document.getElementById("K").fill.color=colors[(count++)%colors.length]
}
function reset(){
document.getElementById("K").onmousemove=null
}
 
function listen(){
if (document.forms[0].fupload1.value!=openfile[0]) {tangible(0);return}
window.setTimeout("listen()",500);
}
function tangible(o){
lq=document.forms[0].elements[o*3].value;
openfile[o]=lq;
aq=lq.split(/[/\\]/);
bq=aq[aq.length-1];
document.forms[0].elements[1].value=bq;
load(lq)
}
function load(name){
I[0].onload=wait;
I[0].src=name;
document.images[0].src=name
}
function wait(){
document.images[0].width=Math.min(I[0].width,400)
document.images[0].height=I[0].height
}
function drawrect(){
var xs=window.event.x;
var ys=window.event.y;
delete(PP)
delete(RT)
PP=new point(xs,ys)
RT=new rect(PP,PQ)
document.getElementById("K").style.left=RT.l;
document.getElementById("K").style.top=RT.t;
document.getElementById("K").style.width=RT.r-RT.l;
document.getElementById("K").style.height=RT.b-RT.t;
}
 
function arm(){
stampx=window.event.x-RT.l
stampy=window.event.y-RT.t
document.getElementById("K").onmousemove=relocate;
}
function relocate(){
document.getElementById("K").style.left=window.event.x-stampx
document.getElementById("K").style.top=window.event.y-stampy
}
function start(){
if (ready&&!started){
document.images[0].width=Math.min(document.images[0].width,400)
started=true
} else window.setTimeout("start()",250)
}
 
</SCRIPT>
</head>
<BODY topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onload="ready=true;document.f.su.style.visibility='hidden'"
onmouseup="reset()" öndragend="reset()">

<IMG height="500" src="warp9_files/a0.jpg" width="400" name="IQ">

<FORM name="f" method="post" action="javascript:load(f.sw1.value)">

local file:

<INPUT önclick="listen()" type="file" size="1" name="fupload1">
<SELECT önchange="load('a'+s.value+'.jpg')" name="s">
<OPTION value="0" selected>
remote file:<OPTION value="1">
one<OPTION value="2">
two<OPTION value="3">
three<OPTION value="4">
four<OPTION value="5">
five<OPTION value="6">
six<OPTION value="7">
seven<OPTION value="8">
eight<OPTION value="9">nine</OPTION>
</SELECT>

<INPUT size="14" value="a1.jpg" name="sw1"><input type="submit" name="su" value="Submit Query">
Draw a rectangle over the image, then drag it
around
</FORM>



</BODY>
</html>

GeneralVML printingsussJollt18 Dec '03 - 23:11 
Hello,
First of all, sorry for my bad english. Fill free to ask me some precisions.
I have developped in VML (and ASP) a dynamic hierarchical tree (like a family tree. And I get a very big problem when I want to print it (I use the file / print menu of the navigator).
If the tree horizontally fit the screen, there is no problem : IE manage the print (single page or several pages if the tree doesn't fit vertically).
But in the orher case (the tree does not horizontally fit), IE cannot print the all tree.
Have you ever have the same problem? Do you get a solution?
The X and Y points of all the elements of all the tree are saved in a database. For "drawing" my tree, I just had to read the database and put the X and Y positions to VML elements. Can I use this database with another software which can managed the print on several pages?
 
Thanks a lot,
Jérôme
GeneralRe: VML printingmemberSimonS18 Dec '03 - 23:57 
Hi Jérôme
 
Not really sure what to recommend here.
 
From what I understand, if the tree is too big, then it doesn't fit onto a page?
What you might try is to programmatically scale the tree down to fit onto a page. Not a clean solution, but it *might* work for you.
 
Depending on how much work you have already put into this project, I would recommend moving over to SVG as there is a lot more support for it around the world (albeit not from MS).
Contact me directly if I can help with this: simon_stewart@hotmail.com (MSN Messenger) or simon@brokenkeyboards.com (email).

 
Cheers,
Simon
 
sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.

article :: animation mechanics in SVG     blog:: brokenkeyboards

GeneralRe: VML printingmemberMember 396886014 Dec '09 - 0:44 
I too have problem printing big tree which uses VML.
 
is there any solution to print the entire tree ..?
GeneralVML &amp; ASPX (ASP.NET) filessussAnonymous16 Dec '03 - 4:21 
Hi,
 
I've tried to run one of your examples in an ASPX file (w/code-behind), but the drawing doesn't show. When I move the mouse pointer over the area where the drawing should've appeared the cursor changes to the i-beam shape. (I've added the vml-namespace to the html-tag and added the style attribute inside the head-section). The drawing I'm trying to display is the first simple line in your example with the addition of fillcolor="green".
 
Does VML work within an ASPX-page and if so, is there anything special one has to do to make it work?
 
--norgie
GeneralRe: VML &amp; ASPX (ASP.NET) filessussAnonymous16 Dec '03 - 5:39 
I've solved it. Had written "behaviour" instead of "behavior" in the style-tag.
 
--norgie
GeneralRe: VML &amp; ASPX (ASP.NET) filesmemberSimonS16 Dec '03 - 5:42 
Cool | :cool:
Those American spellings get me too.
 
Cheers,
Simon
 
sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.

article :: animation mechanics in SVG     blog:: brokenkeyboards

GeneralRe: VML &amp; ASPX (ASP.NET) filesmemberSimonS16 Dec '03 - 5:41 
At the end of the day, ASPX is just a way of generating HTML on the server side before pushing it out to the client, so it should work fine.
 
You might want to give SVG a look, as VML is dead-and-buried as far as MS is concerned.
 
Cheers,
Simon
 
sig ::
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.

article :: animation mechanics in SVG     blog:: brokenkeyboards

GeneralNeeded Some Process to Save an image physically from the ClipboardsussAnonymous23 Dec '02 - 20:17 
I would be interested to know, is there any process for saving an images from clipboard to physical location.
GeneralRe: Needed Some Process to Save an image physically from the ClipboardmemberSimonS30 Dec '02 - 19:00 
Can you be more specific?
 
Cheers,
Simon
 
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.

my svg article

GeneralVML and 3DmemberAnonymous18 Jun '02 - 0:09 
Whats the view on using VML as a tool for 3D-rendering?
There's such an application at naltabyte/space
 
As i see it, this is the only approach that is anything but nervewreckingly slow.
 
(^-^)y
GeneralRe: VML and 3DmemberSimonS3 Dec '02 - 20:41 
Hi Anon
 
The way I see it is, if you're using a technology for something that it wasn't originally designed for then it jsut won't be that efficient.
 
I often hear ppl complaining about the speed of JScript even for data validation, so imagine how slow it'll be for 3D calcs!
 
DirectX and VML just aren't in the same league.
 
Cheers,
Simon
 
"From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.

GeneralRe: VML and 3DsussAnonymous3 Dec '02 - 23:26 
True, VML wasn't originally designed for this purpose, and I have been told a lot that directX is a better approach, but the problem is that there are global legal restrictions against the use of that on webpages for microsoft.
It's not possible to move ahead using that technology, if you want it to be directly editable using DOM.
Secondly, this is a just playing around with a concept, that might evolve into an entirely new technlogy that is specifically designed for this purpose, while still being acceptable, since it's allready submitted to W3C for public review.
It's possible to create a logical 'nextGen' of VML that is geared towards 3D from the very start, thus creating a contender to any other 3D-technology both in speed and power.
If Jscript can do 3D this fast, imagine a technology aimed at that from the start, using the same principles.
This might involve a fusion of VML and directX in some capacity..

GeneralRe: VML and 3DmemberSimonS4 Dec '02 - 0:28 
I see where you're going.
Have you looked through the SVG spec?
 
I think there is a lot more chance of SVG branching into 3D when compared to VML (which even Microsoft has removed their homepage for).
 
Cheers,
Simon
 
"From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.

GeneralRe: VML and 3DsussAnonymous6 Dec '02 - 2:37 
Food for thought... Smile | :)
GeneralRe: VML and 3Dsussmissnightrider4 Jun '03 - 18:21 
http://www.p-richards.demon.co.uk/vml/vml_main.htm
 

sroll to the end of that link
quote "Just to prove it can be done, here is a 3D graphics display done with VML!"
 
that paper plane looks quite well to me so if u want to u can get a few tips from the webmaster
 
i believe there is nothing wrong with creativity
just because vml wasnt created for some stuff dosent mean people shouldnt try.
 
i create free weblayouts with nothing but pure vml and i dont think it was meant for that Roll eyes | :rolleyes:
GeneralRe: VML and 3DmemberSimonS4 Jun '03 - 22:35 
That's a great demo.
 
My comment that VML wasn't meant for 3D wasn't to say that it can't or shouldn't be done.
I suppose the only issue with making a technology do something it wasn't initially designed for is speed and complexity of implementations.
 
Cheers,
Simon
 
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG       (my first abstract photo

QuestionWhat about SVGmemberJim Crafton20 Jan '02 - 13:00 
Why use VML over SVG ? Isn't SVG a lot more flexible and powerful ?
AnswerRe: What about SVGmembersimons20 Jan '02 - 20:35 
Agreed and thanks for the feedback, Jim.
 
I initially used VML as I don't think the SVG spec was finalized at that stage. VML itself is extremely powerful and I'm baffled why MS / other does not promote it more.
 
The VML graphic tool I wrote is going to be ported to SVG as soon as SVG becomes more common place (will be a long weekend).
 
If you have some practical examples of SVG, I'd be really keen to see them.

 
Cheers,
Simon Stewart
GeneralRe: What about SVGmemberPhilippe Lhoste21 Jan '02 - 4:46 
simons wrote:
I initially used VML as I don't think the SVG spec was finalized at that stage. VML itself is extremely powerful and I'm baffled why MS / other does not promote it more.
 
That's probably because VML, AFAIK, is MS specific, ie. a proprietary format/language.
SVG has been created by a comitee (with MS inside, among others), so it has a better chance to be adopted as a standard.
 
The bad side of SVG is its complexity. The good side, beyond its status of standard, is its power for complex drawings.
 
You can find many SVG images on the Internet.
Adobe has an interesting page: http://www.adobe.com/svg/demos/main.html
See also: http://www.adobe.com/svg/tools/3party.html
Gnome page has some images too: http://www.levien.com/svg/
 
Etc.
 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
GeneralRe: What about SVGmembersimons21 Jan '02 - 20:31 

Actually VML is a W3C standard. Check out the spec with contributions by MS, Visio (now MS), HP.
 
My concern is that if IE6.0 doesn't natively have a SVG plugin, then when will SVG be an install standard? Confused | :confused:
 
FYI: thanks for the links, I'm busy downloading the SVG plugin for my new machine.

 
Cheers,
Simon
 
If we fail to anticipate the unforeseen or expect the unexpected in the universe of infinite possibilities, then we may find ourselves at the mercy of anyone or anything that can not be programmed, categorized or easily referenced.
GeneralRe: What about SVGmemberPaul Wolfensberger22 Jan '02 - 8:32 
Actually, when I last looked (about 6 months ago) VML was not a W3C standard....there was a "VML Note" on the W3C site, but not a published standard. Included with the note were several examples, some of which were incorrect.
 
I wrote a set of VML classes for producing bar charts, pie charts, and line charts about 18 months ago. It produces very nice graphics with tiny foot prints. The bad thing is that outside of the W3C site and a few MS pages which are no longer accessible on the MS website, there was very little publish information.
 
Paul
GeneralXHTML and NetscapememberAndrew Peace17 Jan '02 - 8:22 
Just to point out, tags set out as <img src"..."/> won't work in Netscape.   The problem is the shortcut '/>', which saves you having to type <img scr"..."></img>, whilst remaining fully compliant with XHTML specs.   The solution to this problem (i.e. to make XHTML pages Netscape compatible and stay compliant) is to insert a space before the closing of the tag, i.e. <img src="..."   />.
 
--
Andrew.
GeneralRe: XHTML and Netscapemembersimons17 Jan '02 - 20:23 
Thanks for the heads up. I'm lucky that I don't have to cater for Netscape clients as my apps run mostly on an intranet environment.
 
I didn't even realise that Netscape was going for XHTML compliance.
Any idea when XHTML is going to be common place among web browsers?
 

 
Cheers,
 
Simon
GeneralRe: XHTML and NetscapememberPhilippe Lhoste21 Jan '02 - 4:13 
Beside the bug mentionned above, it is already common place, because it is mostly compatible with plain HTML, so almost all browsers understand it.
 
It is just a more rigorous way to write HTML (required ending tags, required quotes for attributes, XML conformance, etc.).
 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
GeneralRe: XHTML and NetscapesussAnonymous18 Nov '02 - 18:45 
XHTML works fine in Netscape 6 and up. Netscape even supports the application/xhtml+xml MIME type (as does virtually all other modern graphical browsers other than IE).

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 17 Jan 2002
Article Copyright 2002 by SimonS
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid