Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which attribute is used in <a> tag for the address of the link?
src href rel
<a href="http://coursesweb.net/" title="CoursesWeb.net">CoursesWeb.net</a>
Which CSS property sets the type of the text font?
font-family text-decoration font-size
h2 {
  font-family:"Calibri",sans-serif;
}
What instruction selects all the <div> tags with class="cls"?
querySelector("div.cls") getElementsByTagName("div") querySelectorAll("div.cls")
var elm_list = document.querySelectorAll("div.cls");
var nr_elms = elm_list.length;       // number of selected items
alert(nr_elms);
Indicate the function that can be used to get the sum of values in an array.
array_sum() array_diff() array_shift()
$arr = array(1, 2, 3, 4);
$arr_sum = array_sum($arr);
echo $arr_sum;       // 10

Last accessed pages

  1. PHP-MySQL free course, online tutorials PHP MySQL code (5202)
  2. PHP PDO - setAttribute, beginTransaction and commit (240)
  3. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (4619)
  4. Multidimensional arrays and array functions (614)
  5. JavaScript code and PHP (1959)

Top accessed pages

  1. PHP-MySQL free course, online tutorials PHP MySQL code (5202)
  2. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (4970)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (4770)
  4. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (4619)
  5. PHP Chat Script (4351)