what is the HTML center tag
What is the HTML <center> tag
- HTML <center> tag use horizontally center content on a web page.
- <center> tag such image,tables, text.
- HTML place inside anything information <center> and </center>.
- <center> tag display middle of the page.
- HTML <center> tag use early web development. easily center content webpage
Syntax of HTML <center> tag
<center>.. .center text.....</center>
<center>.. .center text.....</center>
what is the HTML center tag
Example
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<center>
<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> 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 :-
