With this generator you can make interactive gapfill exercises for your blog or web page. If you want to make an exercise without the interactivity, you can use just the HTML (without the buttons) and the CSS. You could also use this for generating worksheets, but you'd be better going to my Multi-function gapfill generator
Use the program to automatically generate a gapfill exercise
The program will also generate the HTML and Javascript code you need for this particular exercise and it's answers
Copy the rest of the Javascript and CSS code into your blog post or web page
Note - this is slightly different from the previous version, so please read the instructions
Important warning - this code is offered 'as is'. I've tested it and it seems to be fine, but you use at your own risk and I can't take any responsibility for anything that might go wrong. If you have any problems, please let me know in the comments below.
Strong recommendation - I strongly recommend you try this out on a text editor (EG Wordpad - see 'How do I make a web page version' below) before putting it on your blog. I do everything in a text editor first and try it out on my browser before publishing.
This new version has been made possible by the perseverance and enthusiasm of Susan at the English in Vancouver blog, who helped me realise some of the limitations of the original program.
A. First create the exercise
You can choose yourself which words to gap, or for an instant exercise, you can use the automatic gap maker. This makes random gaps or takes away selected groups of words, for example: articles.
How to use - where you see ? mouse over for more details.
Probably the best way to see how it works is to play around with the examples and all the options for a few minutes.
Some general comments
There are really three types of exercise:
lists of questions with one gap per question
lists of questions with more than one gap per question
texts with more than one gap per paragraph
The main things to consider here are numbering and the tick facility. Do you want paragraphs numbered, both questions and gaps numbered etc - play around with the numbering to see what works best.
If you to use the tick facility, for single gap questions the best position is line-end, and for multiple gaps or texts, 'After gap' or 'None'. Again try generating an exercise, press 'Show', then 'Check' and see what works best.
1. Enter the title and instructions (optional): ?
2. Enter a list of questions or a text ?or:
3. Give the exercise a unique Ex Num:
4. Make the gaps, manually ?
or automaticallyShow details
1. To make gaps manually, surround the words to be gapped with square brackets
- bla bla bla [gapword] bla bla bla
2. To make gaps automatically - Enter a text and then you have a choice:
2a. Make random gaps - Select: Qty ? Min Length ? and
2b. Use the preselector - Enter any words you would like gapped, separated by a comma (no space) into the box below. Or use the selector to automatically enter sets: articles. prepositions etc, to be gapped. Then click on 'Go'
Click here to restore the original text
5. Add required treatment to gapwords or text (optional) Show details
You can treat the missing words so they they appear differently in the exercise, but still show correctly in the answers.
Gap word treatment
Show base word
[have been walking\walk] only shows 'walk'
Show part of answer 1
[chair>s] will only show 'chair'
Show part of answer 2
[how to <get] will only show 'get'
Show part of answer 3
[have been <walk>ing] will only show 'walk'
Show more than the first letter
[st_ring] will show st...........
Text treatment
To make something Bold
Surround it with these opening and closing tags<b>word</b>
To make something Italic
Surround it with these opening and closing tags<i>word</i>
To Underline something
Surround it with these opening and closing tags<u>word</u>
6. Adding an example at the beginning (optional)Show details
You can start with an example by beginning the first line EG as in this . This really only works on lists of questions
7. Fine tuning (optional)
- reset to
Title: Position
Numbering:
Questions (Paras)
Gaps
Both
Neither
?
Clickable:?Tick:Show details
Clickable
When 'Clickable' is checked, the 'Click and Drop' function operates - students click on a word in the top box, and then click on the appropriate gap.
Tick
This selexts whether to show a tick or cross after each answer when the check button is pressed. Choose 'Line-end' for lists of questions with one gap per question, and 'After gap' for texts or where there is more than one gap per question. Or you can choose 'None'.
Word box:
Middots
?
Repeats
?
Lower case
?
Select: Gap width
?
Line height
?
font
?
8. Select gap word option Show details
and
Use the selector below to select what to do with the gap words:
Show words
Shows the missing words in a box at the top
No show
Doesn't show the words at all - suitable for listenings etc
Anagrams
Shows an anagram after the gap
In line
Shows only the base word (see below)
Your exercise will appear here
B. Now we'll look at the code
This is in four parts
The HTML code - consisting of:
Optional title
Top word box, if wanted
The main exercise
The code for the buttons
The Javascript program code
The Javascript answer code
The CSS Code
Main principles
Ex Num - You can put as many exercises as you like on a page, but each exercise in your blog must have a unique exercise identifier. You enter this in the Ex Num box. I suggest you use numbers in sequence, but you could use letters or a combination of letters and numbers. You'll be able to see the id of your previous exercise at the bottom of the exercise.
Gaps - each gap has a unique ID number which includes the Ex Num. This is generated by the program and is the basis of how the whole thing works
Variables and Arrays - if using the clickable version you need to declare a universal variable clickedWord="",
the Javascript is built mainly on arrays. The most important to know concerns the answers. These are in an array, for example ans25=["Tom","Dick","Harry"] etc (where 25 is the exNum)
This change from the previous version means that you can now have the exercises showing in your main list of posts. You no longer need to use the 'insert jump break' function to make readers have to open up the post page to do the exercise. They can do it on your home page or on a page of posts opened by clicking on a label.
How do I make a web page version? - Show instructions
If you've got an HTML editor or have made a web page before
I imagine you already know pretty much what to do
If this is your first time
You need to use a text editor of some sort. I use the free HTML-Kit 292, but you can use Wordpad.
Open a new document in Wordpad or a similar text editor. Now paste this code into your empty document, having changed 'Untitled' to a meaningful title.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
</body>
</html>
Now copy the exercise code and paste it into your document between the body tags:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
Your exercise goes here
</body>
</html>
Save the document making sure you change the '.txt' file extension to '.htm'. Save it to somewhere you'll find it easily. For example you could create a new folder 'My HTML' in 'My Documents'.
Go into your browser and open a new tab. Go to the File menu, and click on Open File. Go to your folder and as long as you gave your file the .htm extension, it should be there, ready and waiting. Open the file and Hey Presto! It won't look very pretty, and it won't do anything yet, but the HTML basis is there.
Now it's time to add the style CSS. Add it with its style tags just below the title:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
Your syle CSS goes here
</head>
<body>
Your exercise goes here
</body>
</html>
Save again, remembering to make sure it still has an .htm file extension. Go back to the browser and refresh the page, and it should look much nicer, although it still won't actually do anything.
The final stage is to add the Javascript. Copy and paste it all, inside its script tags,just below the CSS code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
Your syle CSS goes hereYour JS script goes here
</head>
<body>
Your exercise goes here
</body>
</html>
Your page should now look something like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title<
<style type="text/css">
.instrC{
color:gray;
font-weight:bold;
}
and all the rest of your style code
</style>
<script type="text/javascript">
All your JS script
</script>
</head>
<body>
<div>
Your exercise code
</div>
</body>
</html>
Save again, refresh the page again, and this is where the fun starts.
As far as blogs are concerned, I only know the procedure with Blogger. Sorry! But I imagine it's pretty similar on other blogging platforms.
Where do I put the code in Blogger?
If you're not familiar with using code, it would be worth looking at the instructions for a web page above before reading this.
Important! - Please click on this link and read these instructions carefully before putting anything into Blogger - Show instructions for Blogger
- First of all, when entering this code into your post you'll need to use the HTML editor ('Edit HTML') rather than the WYSIWYG editor ('Compose')
Don't put any the code into the template!
Apart from the technical difficulties, this means that I can change things occasionally, but as you are reloading the code each time, everything should work properly. So if you have put any of this code into the template section, please remove it.
On the blog post page you need to do things in a certain order:
.
Use 'Enter HTML' to enter the style section (CSS)
Use 'Enter HTML' to enter a Javascript section opening and closing tags.
Use 'Enter HTML' to enter the interactive Javascript script inside these tags with the checking functions, optionally the Click and Drop code
Use 'Enter HTML' to enter the Javascript answers script
Note - It's best to enter the CSS and Javascript before you put anything else in your post.
Use 'Enter HTML' to enter your exercise(s) suitably placed. You can use Compose' in the normal way to enter any other text you might have, and switch to 'Enter HTML' to enter the exercise.
HTML Code, to go in your main post
In each box - Right Click, Select All and Copy
HTML Title code
HTML Wordbox code
HTML Main exercise code
HTML Buttons code
CSS Code
This can go in the Head section in a web page, after 'title'. In Blogger enter it as the first item on the blog page, before the Javascript and HTML code.
Main points, if you want to change the style
If you want to change the CSS, these are the relevant class names:
The answers code should go into a Javascript section on the page itself. If using Blogger, the answers code should go in a Javascript section at the top of your post page.
Now copy in the answer array for this exercise. If you have more than one exercise, keep adding the answer arrays on new lines:
Note - If you see something like ’ or &# followed by any other four figure number and a semicolon in the answers code, for some reason things like asterisks and inverted commas have been converted into base code, although this shouldn't happen. You do not want this in the JS answers, so you'll need to replace these with their original signs - for example ’ is an asterisk.
Javascript program code
Now copy the rest of the Javascript. It can go in the Body section or in the Head section on a web page, or in the 'New Post' page on Blogger.
JS opening and closing tags
If you haven't already got a Javascript section, you'll need these opening and closing tags
function clearAnsBoxAnswersV2(ansCode,exNum){
for(var c=0;c<ansCode.length;c++){
document.getElementById("ex"+exNum+"AnsBox"+c).value=""
document.getElementById("ex"+exNum+"AnsBox"+c).style.color="black"
document.getElementById("ex"+exNum+"AnsBox"+c).style.fontWeight="normal"
}
clearMessageArea(exNum)
}
function clearAnsBoxInvisibleAnswersV2(ansCode,exNum){
for(var c=0;c<ansCode.length;c++){
document.getElementById("ex"+exNum+"AnsBox"+c).value=""
document.getElementById("ex"+exNum+"AnsBox"+c).style.color="black"
document.getElementById("ex"+exNum+"AnsBox"+c).style.fontWeight="normal"
document.getElementById("ex"+exNum+"TickBox"+c).innerHTML=""
}
clearMessageArea(exNum)
}
function clearMessageArea(exNum){
document.getElementById("messageArea"+exNum).innerHTML=""
}
// Optional JS Code for Click and Drop
function makeClickedWord(exNum,x){
var txt=document.getElementById("ex"+exNum+"Word"+x).innerHTML
clickedWord=txt
}
function enterClickedWord(exNum,x){
var txt=clickedWord
document.getElementById("ex"+exNum+"AnsBox"+x).value=txt
clickedWord=""
}
function enterClickedWordCap(exNum,x){
var txt=clickedWord
var firstLetter=txt.slice(0,1)
firstLetter=firstLetter.toUpperCase()
var rest=txt.slice(1,txt.length)
txt=firstLetter+rest
document.getElementById("ex"+exNum+"AnsBox"+x).value=txt
clickedWord=""
}
- Web Tools - Ipa Code Generator
Using IPA (International Phonetic Alphabet) symbols
Probably the ideal way of using IPA symbols on a web page is to use images. But that can be a hassle. On Blogger, you would have to upload something like forty images.
For me, at least, the...
- Instant Exercise Generator - Vowel Remover Plus
Instant exercise generator - vowel remover plus
Make an instant printable exercise from any short text by removing the vowels, consonants (except y) or every second letter. Or show the first letters and jumble up the rest.
It can also remove punctuation...
- Assorted Gap Fill Exercises
Instant access to 100 gap fill exercises from the first year of the blog. These can be done in several different ways, and can even be edited.
Interactive formats (all also printable)
Note - Not every option will be suitable for every exercise
Multiple...
- Tools - Gapfill Generator
Printable / saveable gapfill exercise generator for teachers
Interactive gapfill tester for students (see 'Making an instant exercise')
Please note - there is now a new improved more printer-friendly version here.
...
- Tools - Matching Exercise Generator (dual-purpose)
Printable / saveable matching exercise generator for teachers
Interactive vocabulary tester for students (see below)
How to use - try first with the examples - where you see ? mouse over for more details
1. Enter the title...