ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2021 Question 16

8 marks · HTML forms and validation

State which essential HTML form element is missing from the form. Write the additional line of HTML code to add the missing form element. During usability testing of the form, feedback indicated that the preferred default contact method should be email. State the attribute that should be added to the email option to achieve this. A customer wants to select both violin and flute but the form does not allow this. Re‑write the line of HTML code to allow this. A range of personas are used when conducting usability testing of the website. State one suitable persona and explain why adopting this persona is helpful when conducting usability testing. Persona Explanation When designing the website the image and heading are to be on the same line as shown below. The following HTML and CSS code is used. <head> <style> img {float: right;} </style> </head> <body> <h1>Music tuition since 2006 </h1> <img src="musicnote.jpg" width = 200> … However, the image appears on the line beneath the heading, as shown below. The following CSS rule is added. h1 {display: inline;} Explain why the display property of the h1 element had to be changed to achieve this layout. Music Tutor is a company that offers music lessons. They are creating a website to advertise the business. A ‘Contact Us’ page will contain a form where customers supply their details and make an enquiry. The HTML code for the form is shown below. <form> Name: <br> <input type="text" name="name"><br><br> Email Address:<br> <input type="text" name="email"><br><br> Mobile Number:<br> <input type="text" name="mobile"><br><br> Instrument:<br> <select name="instrument" size="3"> <option value="clarinet">Clarinet</option> <option value="flute">Flute</option> <option value="trumpet">Trumpet</option> <option value="tuba">Tuba</option> <option value="violin">Violin</option> </select> <br><br> Contact Method:<br> <input type="radio" name="contact" value="Phone">Phone Call<br> <input type="radio" name="contact" value="Email">Email<br> <input type="radio" name="contact" value="Text">Text Message<br> <br> Additional Comments:<br> <input type="textarea" name="comments" rows="10" cols="30"> <br><br> </form>

Marking scheme

Submit (button) <input type=“submit”> Additional attributes for the input are not required. Checked <select name=”instrument” size=”3” multiple> • persona may be that of a non- technical, reading ability, accessibility issue • allows developer to assess/observe/gain feedback on aspects of the website for example navigation, use of form, visual layout etc. Do not accept young, elderly or age on its own. • the heading is a block element • which takes up all of the width of its container element • changing it to an inline element allows the heading and the image to take up the width it requires 1 mark for each bullet Maximum 2 marks

Previous question: Higher Computing Science 2021 Question 15

Next question: Higher Computing Science 2021 Question 17