what is the HTML center tag

what is the HTML center tag

web designing theory

This Blog You Will Learn 

 What is the HTML <center> tag

 Syntax of HTML <center> tag

ஃ what is the HTML center tag Example 

Explain Program

 what is the HTML center tag Output

What is the HTML <center> tag

  1.  HTML <center> tag use horizontally center content on a web page.
  2. <center> tag such  image,tables, text.   
  3. HTML   place inside anything  information  <center> and </center>.
  4.  <center> tag display  middle of the page.
  5.  HTML <center> tag use early web development. easily center content webpage

 Syntax of HTML <center> tag

<center>.. .center text.....</center>

what is the HTML center tag

Example 

<!DOCTYPE html>
<html>
<head>
    <title> HTML Center tag  </title>
</head>
<body>
    <center>
    <h1> HTML center TAg </h1>
    <p>Your Name :</p>
    <p>Your Class: </p>
    <p> Your Address:</p>
    <p>Your ID :</p>
    </center>
</body>
</html>

what is the HTML center tag

Explain Program

Step  1] 

<!DOCTYPE html>

  • This declare the document type.
  • browser that the document is written in html

Step 2 ]

<html>.... . </html>

  • html is the root element of the html page.
  •  Every thing inside it is part of the webpage.

Step 3]

<head>
     
  <title> HTML label tag </title>
    </head>

  •   <head>  section 
  •   head section contains metadata about page. not visible on the page itself.
  •  <title> tag  title section set the title of the page shows the browser tab. 

 Step 4]

<body>
<center>
    <h1> HTML center TAg </h1>
    <p>Your Name :</p>
    <p>Your Class: </p>
    <p> Your Address:</p>
    <p>Your ID :</p>
    </center>
</body>

  • <body> body contains the visible content webpage.
  • <HTML <body> main part of webpage.
  • html <h1> tag  heading. 
Step 5]

<center>
    <h1> HTML center TAg </h1>
    <p>Your Name :</p>
    <p>Your Class: </p>
    <p> Your Address:</p>
    <p>Your ID :</p>
    </center>

  •  HTML  <h1> tag defines main heading  webpage.
  • Display large bold heading. 
  • HTML <center>  tag  use align  content to the center of the page.
  •  HTML<center> center align text on webpage.
  • HTML <center> tag centers content placed inside horizontally on the webpage.

Step 6]

   Closing tag


    </center>
</body>
</html>


what is the HTML center tag

Output











Related Post :-

html article tag example

how to use the address tag in html

how to abbr tag in html

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Outline Color Property in 2026

how to add background image in html.