HTML2: Attendance and activity¶
During this session, students shows the sample solution of the exercise and the instructor checks the attendance. The instructor also gives feedback on the exercise. Teams are going through the following questions:
2.1 Tables¶
What is the purpose of <thead>, <tbody> and <tfoot> tags?
What is the recommended position of table caption?
Which other means there are to describe the overall meaning of the table in addition to caption?
How would you make cross references within a HTML document - so that jumping to table was possible?
2.2 Quiz with HTML forms¶
You were told to use <p> to denote the questions in the Quiz. Is there a better way to markup the questions?
Why is the name attribute same for all the radio buttons?
<fieldset> wasn’t used on this exercise but it could’ve been. Where could you use the <fieldset> and how would you use it, ie. what purpose would it serve?
<input> is very versatile, in this instance it is used to denote a radio-button. What other uses can input serve?
2.3 Book a cruise¶
Specialized input types are good for validation. What are the benefits of validation?
In regexpeople we trained regex notation. Think about email - what kind of regex would you suggest for email checking?
<option> is said to be one of the replaced elements? What does “replaced element” mean? Why is <option> replaced content?
The format of dates, units, currencies belong to localization. How do you signify the language and locale in your HTML document?
U.S date field format is a bit different from the Finnish one, i.e., mm/dd/yyyy, in Swedish region the date format dd/mm/åååå. Which settings have an effect on this?
2.4 Form, methods and actions¶
Which are the allowed HTTP methods in forms?
What are the other HTTP methods?
When and why are the other HTTP methods used?
What is the purpose of the action attribute in the <form> tag? (
What happens if action attribute is omitted?
What will happen if you press a <button> (notice: no type) vs. if you press <input type=”submit”> button? In both cases, the button is inside the <form>-tag
What do you expect “preventDefault” in javascript to mean - the question is connected to previous question? We will return to events in the javascript modules.
A+ presents the exercise submission form here.