Html Course


HTML Headings

HTML offers six levels of headings, using paired tags, from Heading 1 ( <h1> ... </h1>) to Heading 6 ( <h6> ... </h6>).
Each browser displays the headings in boldface, using its default font and descending font sizes, from Heading 1 (the biggest) to Heading 6 (the smallest).
- You can add CSS styles to change the Heading's font size, color, and other properties..

Use <h1>, <h2>, ..., for headings only.
Headings are important, search engines use document headings to index the structure and content of your web pages.


- Example:
<!DOCTYPE html>
<html>
<head>
<title>Example Headings</title>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>

HTML Comments

Comments are used to insert notes into the document that are not displayed by the browser.
To add a comment, use the <!-- --> tag, placing the comment between the two pairs of dashes.

- Example:
<h4>Example HTML with Comments</h4>
<!-- This is a comment, Start Menu -->
<ul>
 <li>Menu one</li>
 <li>Menu two</li>
</ul>
<!-- End Menu -->
Comments can be any length and are not restricted to one line.
Although browsers don't display comments when they display the web page, they can be viewed in the source code of the web page.
- To view the source code for the page currently displayed in Google Chrome browser, right-click on the page, then click View Page Source (or Ctrl+U).
- To view the source code in Mozilla Firefox, click the View menu, and then click Page Source (or Ctrl+U).

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which meta tag provides a short description of the page?
<meta content="..."> <meta description="..."> <meta http-equiv="...">
<meta name="description" content="70-160 characters that describes the content of the page" />
Which CSS property is used to stop the wrapping effect of the "float"?
clear text-align position
#some_id {
  clear: both;
}
Click on the method which gets an array with all the elements in the document that have a specified tag name.
getElementsByName() getElementById() getElementsByTagName()
var divs = document.getElementsByTagName("div");
var nr_divs = divs.length;
alert(nr_divs);
Indicate the PHP function which returns the number of elements in array.
is_[) count() strlen()
$arr =[7, 8, "abc", 10);
$nri = count($arr);
echo $nri;        // 4
HTML Headings and Comments

Last accessed pages

  1. String Object (667)
  2. Register and show online users and visitors (39428)
  3. PhpSpreadsheet - Read, Write Excel and LibreOffice Calc files (26057)
  4. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (137889)
  5. Adding text with ActionScript 3 (5501)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (202)
  2. Read Excel file data in PHP - PhpExcelReader (66)
  3. The Mastery of Love (56)
  4. PHP Unzipper - Extract Zip, Rar Archives (51)
  5. Working with MySQL Database (34)
Chat
Chat or leave a message for the other users
Full screenInchide