Spread the love

In this blog, we learn 3 tags (header, hr, and HTML). with examples and output.

HTML <header> Tag

How to use Header Tag in HTML?

In this blog, we’ll show you how to use HTML <header> Tag. HTML <header> Tags are used to create introductory content or navigation. Typically, the <header> element contains one or more heading elements, logos or icons, or author information.

Note:- You can use multiple <header> elements in the same document, but the <header> element cannot be placed in the <footer> , <address> or other <header> element.

We will see two examples of header tags below:-

Example1:- HTML <header> Tag.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML Header Tag</title>
</head>
<body>
<h1>This Is Header Tag example</h1>

<header>
  <h1>Well-Come Myprograming</h1>
  <p>All materials are shown on HTML, CSS, JavaScript, Bootstrap, jQuery, and other <br>programming tutorials are available on myprogramming.</p>
</header> 

</body>
</html>

Output:-

Example2:- HTML <header> Tag with CSS Style.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML Header Tag</title>
</head>
<style>
  header{
    background-color: yellow;
    padding: 50px;
    color: blue;
    border: 5px solid #000;
    border-radius: 50px;
  }
</style>
<body>
<h1>This Is Header Tag example</h1>

<header>
  <h1>Well-Come Myprograming</h1>
  <p>All materials are shown on HTML, CSS, JavaScript, Bootstrap, jQuery, and other <br>programming tutorials are available on myprogramming.</p>
</header> 

</body>
</html>

Output:-

How to use Hr Tag in HTML?

HTML <hr> Tag

The HTML <hr> Tag is used to specify the break of paragraph-level topics in a hypertext mark-up language document. It is used when you suddenly change your subject in your HTML document. It draws a horizontal line between them. It is collectively known as the horizontal decree hypertext mark-up language.

Note:- You can also customize the HTML <hr> Tag by adding CSS style.

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML hr Tag</title>
</head>

<body>
<h1>This is HTML hr Tag example</h1>
 
  <h1>Well-Come Myprograming</h1>
  <hr>
  <p>All materials are shown on HTML, CSS, JavaScript, Bootstrap, jQuery, and other <br>programming tutorials are available on myprogramming.</p>
  <hr style="width: 50px;margin-left: 0;border: 2px solid #000;">
   <p>All materials are shown on HTML, CSS, JavaScript, Bootstrap, jQuery, and other <br>programming tutorials are available on myprogramming.</p>
 

</body>
</html>

Output:-

What is HTML Tag?

HTML <html> Tag

This <html> Tag represents the origin of that HTML document and is therefore also referred to as the original element. And all the elements in it tell the browser that the document is an HTML document.

And before the <html> Tag we just <! We can use Doctype> Ad that informs the browser about the HTML version.

Note:- You must always include a lang attribute within the tag to reveal the language of the web page. This is to help search engines and browsers.

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML  Tag</title>
</head>

<body>
<h1>This is HTML Tag example</h1>
 
  <h2>Well-Come Myprograming</h2>
 
  <p>All materials are shown on HTML, CSS, JavaScript, Bootstrap, jQuery, and other <br>programming tutorials are available on myprogramming.</p>
  
</body>
</html>

Output:-


Spread the love

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *