XHTML >> Tags >> H1, H2, H3, H4, H5, H6 | DevGuru

Devguru Home

Primary links

  • Home
  • Quick Refs
    • ADO
    • ASP
    • CSS2
    • HTML
    • Jet Sql
    • Javascript
    • T-SQL
    • PHP
    • VBScript
    • WML
    • WML SCRIPT
    • WSH
    • XHTML
    • XML DOM
    • XSLT
  • Features
    • HTML Color Chart
    • Knowledge Base
    • Tutorials
  • Site
    • Authoring
    • Devguru Resume
    • Link to Us
    • Testimonials
    • Contact Us
    • Privacy Policy
  • Search

Font-size: A A A

XHTML » Tags » h1, h2, h3, h4, h5, h6 Syntax: <h#> ... </h#> where # = 1, 2, 3, 4,

The h1, h2, h3, h4, h5, h6 tags are used to create text headers for a document. They can display the header text in one of six different sizes. h1 is the largest size and, as the integer number increases to h6, the text size becomes progressively smaller. The exact display appearance of the header text is browser dependent.

This tag also automatically inserts a carriage return and line feed after the closing tag (i.e., a paragraph break). The true purpose of this tag is only to create headers and titles, and not to set text font size. You are to use style sheets to set the font properties for a text. The separate closing tag is mandatory.

Examples

Code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>DevGuru XHTML h Tag Example</title></head><body><h1>DevGuru in h1</h1><h2>DevGuru in h2</h2><h3>DevGuru in h3</h3><h4>DevGuru in h4</h4><h5>DevGuru in h5</h5><h6>DevGuru in h6</h6></body></html>
Output:
DevGuru in h1

DevGuru in h2

DevGuru in h3

DevGuru in h4

DevGuru in h5
DevGuru in h6
Language(s): XHTML

Events

onclick

Syntax: onclick="action"

The onclick event is associated with the single click of a mouse on a selected HTML tag (element). Whenever you single click the element, the script code of the onclick is executed. This script can also call functions or subroutines which contain code that you want to run when the single click occurs.

ondblclick

Syntax: ondblclick="action"

The ondblclick event is associated with the double click of a mouse on a selected HTML element. Whenever you double click the element, the script code of the ondblclick is executed. This script can also call functions or subroutines which contain code that you want to run when the double click occurs.

onkeydown

Syntax: onkeydown="action"

The onkeydown event is associated with pressing down a key on the keyboard while the mouse is inside a selected HTML tag (element). In other words, the key down event occurred while the HTML element was in focus. Whenever you press down the key, the script code of the onkeydown is executed.

onkeypress
  • onkeyup
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • b
  • big
  • code
  • dfn
  • pre
  • small
  • strong
  • tt
  • Print this Page E-mail this Page Total Event and Association Management

    © Copyright 1999-2018 by Infinite Software Solutions, Inc. All rights reserved.

    Trademark Information | Privacy Policy

    Event Management Software and Association Management Software

    Từ khóa » H1 Vs H4 Html