The problem is that the HTML object is not the last in the cell. Therefore, it is ignored in the same way that any other value is not displayed without printing, unless it is the last in the cell. If you execute a cell with the following code, you will not see a warning window.
HTML(''' <script type="text/javascript"> alert("hello") </script> ''') print("hello")
Make sure the last object in the cell is an HTML object and you will see a warning window.
HTML(''' <script type="text/javascript"> alert("hello") </script> ''')
Therefore, examples of Anthony Perot's work are separate cells. This should also work:

source share