In today’s class we learn how to add HTML5 elements to how app. This is essential as it will enable your app to have more features such as buttons, image, different type of text (emphasized text, italicized text, bolded text, etc.), select menu, etc.
To start with, we should know that all elements should have a tag, some only have a closing tag while others both have an opening tag and a closing tag.
Every opening tag starts with the character <element’s_symbol> – without the apostrophes. Within the brackets is the element’s symbol. you want to use. The following illustrates the idea.
For a paragraph use <p> – note there is no apostrophe.
For a button use <button>
For an image use <img>
Etc.
The closing tag of elements that should have a closing tag should be thus </element’s_symbol>.
Now let’s go forward and see how to add some and more of the elements.
Adding a new paragraph: This is for adding a text paragraph to be seen on any portion of your app.
we have learnt how to do this so I won’t teach how to do this today
Having done that, the cursor is automatically placed in between the closing and opening tag
(i.e. <p> CURSUR HERE </p). So, start typing what paragraph text you want or add other elements if you wish.
Adding Buttons: Buttons are usually included for app users to click for app to do something based on user’s choice
It is done in the same way as described above for adding paragraph. So try it out. The syntax for button is:
<button> Name of Button/Action Here </button>
Adding Option Menu: A kind of drop down list for users to choose from.
Do as above but the element tag should go thus:
Start typing <sel, choose the <select> and click enter for the below syntax to be generated automatically by sublime text.
Click ENTER again to make it look thus:
<select>
</select>
In between the space between the opening and closing tag where sublime text places the cursor automatically, type and choose <option> for the below syntax to be generated by sublime text automatically.
Finally type the name of the options in between the opening and closing tag e.g. <option>Subscribe Now</option>
You can also add more options in the same manner. E.g. for three options. Your syntax should look thus:
<select>
<option>option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
You can try to add and test other elements by typing and choosing any suggestion e.g. <b> for bold text, <i> for italicized text etc. When done, go to your browser and refresh to see the effect of each change you have made.
We have come to the end of this class. Hope it was helpful? See you in the next class. Bye.
What is the Main Cause of a Heart Attack? What is its Solution? A heart attack is the blockage of… Read More
In the vast economic arena, one term that often takes center stage, inciting extensive debates and discussions, is the "debt… Read More
De-Dollarization: The Changing Face of Global Finance The financial landscape is in a state of flux, with an intriguing economic… Read More
The curtains closed on a dramatic Bundesliga season with Bayern Munich standing tall once again, clinching their 11th straight title.… Read More
The Unfolding Story of Celine Dion's Health In recent news that has left fans across the globe stunned, iconic singer… Read More
As the echoes of the recent NBA season start to fade, the attention of enthusiasts is firmly glued to one… Read More