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>
<title>Example Headings</title>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

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 -->
 <li>Menu one</li>
 <li>Menu two</li>
<!-- 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

Which tag is used in <table> to create table header cell?
<thead> <th> <td>
  <th>Title 1</th>
  <th>Title 2</th>
Which CSS property sets the distance between lines?
line-height word-spacing margin
.some_class {
  line-height: 150%;
Which function opens a new browser window.
alert() confirm() open()
document.getElementById("id_button").onclick = function(){"");
Indicate the PHP function that returns an array with names of the files and folders inside a directory.
mkdir() scandir() readdir()
$ar_dir = scandir("dir_name");
HTML Headings and Comments

Last accessed pages

  1. OOP - Classes and objects - Create Class (2316)
  2. Creating Custom Colors (1808)
  3. Node.js Move and Copy file (19411)
  4. CSS Rhombus Shape (4758)
  5. PuzzleImg - Script to Create Image Puzzle Game (5163)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (522)
  2. Register and show online users and visitors (361)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (273)
  4. JavaScript Course - Free lessons (265)
  5. querySelector and querySelectorAll (265)