Fill is attribute is used to fill color in shapes.
fill="color"
You can use fill attribute in any shape to apply color.
Opacity attribute is used to make any shape blur in color or completly transparent.
fill-opacity="value"
stroke-opacity="value"
stroke opacity attribute is applied to those shapes which do not support fill opacity attribute like SVG lines etc. You should use stroke-opacity for lines or any other shape which does not support fill opacity and you can give 0.0 to 1.0 value to opacity.
You can use SVG fill any where within an HTML document.
Open notepad or any other text editor, follow the following points.
save file with name task.html or task.htm and then open it using any browser and see results.