Even though HTML is a totally new skill for most learners, there is no reason that the HTML questions should not become a place to score really high marks in your PAT and assessments — and have some fun in the process! Here is some practical advice for tackling the HTML section of the CAT syllabus.
HTML is simple. All you need is a text editor and a browser — both of which are free. Download Notepad++ here… Be sure to get the best out of Notepad++ by setting it up correctly — read the post Coding HTML with Notepad++ to learn how.
Be sure to grab a copy of the NSC HTML Tag sheet (updated in 2021) that is used in every formal assessment, but don’t rely on it entirely as you may be asked questions in your theory paper where you will not have it on hand. With some practice, you will soon memorise all the different HTML tags and attributes. And don’t stop there: there are loads of additional related skills that you can learn — real-world skills that could lead you into a career in web development!
You need to work in an orderly, disciplined fashion and always use syntax that is 100% correct. Open a tag, close the tag, then add the content between the tags. You can set Notepad++ up to automatically close your tags — see the post: Coding HTML with Notepad++. Keep your code neat and use TABs to indent your lines of HTML to make it easier to read and understand:
<html> <head> <title>MisterFoxOnline</title> </head> <body> <p>Indent your code neatly to make it easier to read!</p> <table> <thead> <tr> <td colspan="2">Table heading</td> </tr> </thead> <tbody> <tr> <td>Row 1</td><td>Information</td> </tr> <tr> <td>Row 2</td><td>Information</td> </tr> <tr> <td>Row 3</td><td>Information</td> </tr> </tbody> </table> </body> </html>
Remember that white space between tags is ignored when the browser renders your HTML code; it is used purely to make your code easier to read and edit. When viewed in the browser:
<!-- This line of code: --> <h1>Here is my heading</h1><p>Here is my paragraph.</p> <!-- will look exactly the same as these lines of code: --> <h1>Here is my heading</h1> <p>Here is my paragraph.</p>
Test early, test often
Test early, test often. Every time you write some code or make even the smallest change to your code, be sure to test it. in your browser. The sooner you identify any errors the easier it is to fix them.
See the Pen Hello World! by David Fox (@foxbeefly) on CodePen.0