It seems like you have opened this file by double-clicking on it. In order to test your build in a browser you need to load this file from a web server. You can either upload this file and the rest of the files from a Defold HTML5 bundle to a web hosting service OR host them using a local web server on your home network.
The parent/child relation is set up right in the editor by placing the parent and child game objects in the same collection and then simply dragging the child game object onto the parent.
Note that such a hierarchy must be created in a collection if you do it in the editor.
Scripts
parent.script
child.script
If you want to play with these examples, you can get the project on Github.
Do you want to see more examples? Why not write a few yourself and submit a pull request? We love contributions.