Generative Artificial Intelligences (AIs)

Artificial IntelligenceHTMLWeb DevelopmentCSSJavaScriptjQuery

Generative Artificial Intelligence (AI) has many uses for eLearning developers, but the main way I will be encouraging you to use it in this book and with these projects is to help you remember and generate HTML, CSS, JavaScript, and jQuery syntax.

These tools change and improve rapidly, and for the purposes of this book, you may use any AI that you have available to you. Some of the more popular ones at present include the following:

Forming Prompts for an AI

The quality of output you receive from an AI is directly influenced by the quality of prompt you provide. For our purposes, you generally should include four things in any prompt: the language or syntax, the target document or product, the desired action or format, and any parameters to operate within.

Here are a few examples of useful AI prompts to try:

In JavaScript, select all links from a web page, and return their URLs as a comma-separated list.

Create a boilerplate HTML document for an eLearning module that includes an external CSS, an external Javascript file, the jQuery library, and Bootstrap.

Create a CSS definition for blockquotes that indents the text, makes it italicized, and changes the color to a dark grey.

Create a jQuery function that detects when a link on the page is clicked and sends the event to an API for collection.

In Bootstrap, make an accordion that expands and contracts when clicked. Then, send the state of the accordion as an event to the API.

Additionally, many AIs remember your previous prompts and can build upon them. So, if you used the third prompt above and then decided you wanted the color to be blue, you could just provide a prompt like "make the text blue instead" to receive an updated version of the answer. If the output doesn't work the way you anticipate, you can also let the AI know about your unexpected behavior or any errors that you receive so that it can try to provide a better solution.

This content is provided to you freely by EdTech Books.

Access it online or download it at https://edtechbooks.org/elearning_hacker/generative_artificial_intelligences.