Thursday, December 31, 2020

hr tags in html | Center Tag In HTML | br tag in HTML

 

hr tag in html


Hr Tags In HTML 

When we use <br> tag in HTML Document Everything Sarts From new Line  
Basically, this tag has Nothing inside like other tags like a paragraph tag 
 heading tags or 
all other tags respect <br> tag 
When we put <br> tag in HTML documents we give some space between
 br and forward slash 
Like <br /> 

Example of <br /> Tag

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Html | Tags</title>
    <meta name='viewport' content='width=device-width, 
initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen'
 href='main.css'>
    <script src='main.js'></script>
</head>
<body>
    <p>In this lesson we are going to understand horizantal line 
Tag
        when we use <br /> Tag Everything Starts From New Line 
    </p>
</body>
</html>

Try this Your own self

In Above Example we can see the <br> tag is used
and the output can
be shown on the screen which is given bellow





Center Tag In HTML DOCUMENT

When even we use Center Tag in HTML Document Everything Shown in Center on screen
this Tag really helpful whenever we want to use minimum lines of code to put the HTML
Document in the Center
The Syntax of Center Tag is <Center ><Center />
As this Tag is Pair Tag that's why is Has many other tags and statements inside it
Lets Discus its example

Example :

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Center Tag in HTML</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
    <script src='main.js'></script>
</head>
<body>
    <p>In this lesson we are going to understand horizantal line 
Tag
        when we use <br /> Tag Everything Starts From New Line 
            </p>
    <center><p>In this lesson we are going to understand horizantal line Tag
        when we use <br /> Tag Everything Starts From New Line 
            </p>
    </center>
</body>
</html>

Try This By yourown self



This Document will show Output Like





hr Tag in HTML

Hr tag is used to draw a horizontal line in HTML DoCument
Whenever we use <hr> tag in HTML Document it Starts from Center of Document
And breaks the document from Left to Right margin
hr tag can be used in paragraph tag or we can use this any ehere in html Document
To understand <hr> tag Lets Discuss an example :


Example :


<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Center Tag in HTML</title>
    <meta name='viewport' content='width=device-width,
 initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen'
 href='main.css'>
    <script src='main.js'></script>
</head>
<body>
             <p>I am a paragraph with out Horizantal line 
            </p>
            <p>
                I am paragraph with <hr> i this paragraph
 use can see the Horizantal line 
                is drawn in HTML Document 
            </p>
</body>
</html>

Try this by yourself

OutPut od this HTML Document will be :




This Lesson Is Ended up


Thanks for Reading This Blog

Kindly Share This with your friends And stay Connected




0 comments:

Post a Comment