Create a widget

I need to check the status of airline flights very often. Instead of using the various dedicated websites, I just google the airline and flight number. I thought it might be more convenient to create a desktop or browser widget to do the look-up by entering the flight number, such as AA1234.

Not knowing the first thing about programming such a thing, I asked both Chat GPT and BARD to write a widget for me. I got similar code from both of these. The problem is I can’t figure out how to get it to execute. I have the code in a text file. It starts like this

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">  
<meta name="viewport" content="width=device-width, initial-scale=1.0">

   
<title>Flight Status Search Widget</title>
    <style>
        .widget {
            width: 300px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ccc;
        }

This is just a small sample of the code the two AI apps wrote for me. So, how does this become executable?

It does not. It is HTML page which you open in your browser.

Looks like I have a lot to learn. I’ll see what I can develop.

When I copied this file (and the other version) from the chatbot, I saved it as a doc file. My browsers don’t open this as html. I used the wrong question, but what I must learn is how to make these lines of code become readable to a browser. I may climb the steep learning curve and build a widget from scratch.

Just open this file in browser or rename file with .html extension.