- For example, consider the following errors novices frequently make with lists. students may use a paragraph tag instead of a list item tags, or add numbers through text to create an ordered list instead of using the proper tags.
-
<p>1. First item</p>
<p>2. Second item</p>- In this error, students are using the paragraph tag instead of the list elements tag. Additionally, they hard code the ordering of the lists elements instead of using HTML ordered list tags.
- Below is the correct code for this error:
<ol>
<li>First item</li>
<li>Second item</li>
</ol>
<ul>
- <p>Item one</p>
</ul>
- In this error, students correctly use the unordered list tags but then use the paragraph tags for list items instead of the list item tags.
- Below is the correct code for this error:
<ul>
- <li>Item one</li>
</ul>
<ol>
- <li>1. Item one</li>
<li>2. Item two</li></ol>
- In this error, students fallaciously add the numbering for the list items inside the list items tags. However, since this was correctly tagged as an ordered list, the list items will be numbered by the list item tag and by the hard coded text, resulting in double numbers.
- Below is the correct code for this error:
<ol>
- <li>Item one</li>
<li>Item two</li></ol>
-
- This type of error is called a rules-based error. It occurs when the student is familiar with the basic rules and constructs of a language, but comes up against an unknown exception, edge case, rule, etc.
- This may be the result of incorrect research or assumptions about what is valid, or it can simply be the result of not knowing all the rules, exceptions and edge cases for programming with HTML and CSS.