Welcome to HTML2 world! Let's start our journey through hundreds or thousands of lines of code! But first, you should create an HTML2 file.
Open the folder where you want to code and create a file, named "myfirstapp.html". Well done! Now, of course, you need to open this file.
Let's start our coding with announcement, creation, and configuration of the app:
You've just announced, created, and configured (a little bit) your first app! Let's look at it... [html] is tag, that sets your program, create - the verb, which "tells" the program that you are creating an app. After that comes the app's name, which is "My first app". Then, after the comma goes "set: {" - It reports to the program that you are setting this object (but the "set:" part is not necessary)
In new line we are creating our first property - title with value -
Now let's add an icon to your app! You can add an icon with icon property.
So here we see new thing - file(). It's a built-in function, meaning you don't need to connect anything to use this function. But what is it doing? Well, with this function is
used to create a reference to a file, which is located where the file with your code is. Otherwise (when icon is in the special folder), you can write file(
Now let's make a first object in your project! The [body] tag is used to interact with the program's "body" in HTML2.
And now let's look at this code! The "create" verb adds an object to the program's interface.
The next thing is our new property - text, which controls the object's text value.
So if you've done everything correctly, the text, which says 'Hello world!' should pop up. If not, don't worry! It's okay to make mistakes, so try again!
So now we'll create an input field and make our first lines of scripts!
Our new object is very similar to our previous object, but with a very big difference - the new Input class! The text property works similarly here.
If an object like this popped up, you've done everything correctly and are ready to go to the next stage - programming our objects!
In the next stage of our HTML learning, we are going to program our Input object to receive text changes and behave accordingly to the text written on it.
This is your new [html] verb - decode, which is responsible for coding your program. So let's start programming (keep in mind that coding in HTML would be a bit different)!
Our first text changes when the text in our Input block changes. Now let's change our Input object depending on its value with some new and fresh properties!