TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

HTML

HTML Headings

Overview

HTML Headings can be used to specify topic titles and sub-topics titles in an HTML document.

Heading Syntax

We can define six levels of headings in an HTML document. The general syntax of the heading tag is as follows:

<h1> Sample Heading </h1>

The heading tags are <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. <h1> is the largest and <h6> is the smallest.

Example Code

<html>

<head>

<title> HTML Tutorials – HTML headings</title>

</head>

<body>

<h1> Example of H1 Heading </h1>

<h2> Example of H2 Heading </h2>
<h3> Example of H3 Heading </h3>
<h4> Example of H4 Heading </h4>
<h5> Example of H5 Heading </h5>
<h6> Example of H6 Heading </h6>

</body>

</html>

Sample Output

Save the code with .htm or .html file extension. Launch the HTML page in the web browser. Sample output of the code in the browser.

HTML Headers

 

We can notice that the size of the headings decreases from h1 to h6 gradually. The main headings in the HTML document can be <h1> and sub topic headings can of <h2> or <h3>.

 

—

HTML Tutorials

HTML Tutorials on this website:

https://www.testingdocs.com/html-tutorials/

More Information on HTML:

https://www.w3.org/TR/html401/intro/intro.html

 

Related Posts

Create HTML File

HTML /

Create HTML file with NetBeans IDE

HTML /

HTML5 Document Structure

HTML /

Introduction To HTML5

HTML5 Application NetBeans

HTML /

Create an HTML5 Application using NetBeans IDE

CSS Validator Tool

HTML /

HTML & CSS Validator Tools

‹ HTML Elements› HTML Paragraph

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version