XHTML >> Tags >> H1, H2, H3, H4, H5, H6 | DevGuru
Primary links
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 h1DevGuru in h2
DevGuru in h3
DevGuru in h4
DevGuru in h5
DevGuru in h6
Language(s): XHTML
Events
onclickSyntax: 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.
ondblclickSyntax: 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.
onkeydownSyntax: 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© 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
-
HTML H1 To H6 Tag - W3Schools
-
–
: The HTML Section Heading Elements - MDN - Mozilla
-
H1, H2, H3, H4, H5, H6 HTML - W3schools.blog
-
Header Tags: A Simple (But Complete) Guide To H1, H2 And H3 Tags
-
HTML:
Tag - TechOnTheNet
-
HTML: The H1 To H6 Tags - Khan Academy
-
HTML Heading Tags: The SEO Guide For H1 - H6 - SE Ranking
-
HTML - Heading Elements H1, H2, H3, H4, H5 And H6.
-
H1 Vs. H2 Heading Tags: Here's The Difference
-
What Are H1, H2, H3, H4, H5, And H6 Tags And How Do They Affect ...
-
Heading Tags, What Are They And How To Use? | By Thiago Vaz
-
Counting With HTML5. Should H1, H2, H3, H4, H5 And H6 Be ...
-
What Is The H1 Tag And Why It Is Important For SEO - Reliablesoft
-
H1 Vs H2 Vs H3: What Are Heading Tags And How To Use Them?