Please Reload>

You Can Add HTML?

Lesson 7 of ByteBudget Script

Previous Lessons

Up till now our ByteBudget

has included all the HTML within the variables;

but you can add HTML right in your string.

This is a variable with the width omitted. We're going to add the width in the string of our script.

var a = "<td bgcolor=e18b6b height=20 width=";

Remember all HTML is enclosed in quotes, even numbers.

So they must be used in the string as below.


As always we use correct html syntax.

You can add any HTML to you string, not just numbers.

In the following string we've used HTML for the middle td cell.

write(d+a+"20"+e+f+"<td bgcolor=cornflowerblue height=20 width=10></td>"+a+"20"+e+g);

Now that you can add HTML in your Byte strings, you have a lot more control, when some codes are only used once.