TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML header tag

HTML header tag with examples, html5, forms, input, text, anchor, image, heading, marquee, textarea, paragraph, title, quotes, code etc.

<< Back to HTML

HTML Header Tag

HTML <header> tag is used as a container of introductory content or navigation links. Generally a <header> element contains one or more heading elements, logo or icons or author's information.

You can use several <header> elements in one document, but a <header> element cannot be placed within a <footer>, <address> or another <header> element.


HTML Header Tag Example

<header>
<h2>ABCOnline.com</h2>
<p> World's no.1 shopping website</p>
</header>
Test it Now

Output:

ABCOnline.com

World's no.1 shopping website


Let's see another example of header tag with CSS code.

CSS Code:

header{
border: 1px solid pink;
background-color:pink;
padding:10px;
border-radius:5px;
}

HTML Code:

<header>
<h2>ABCOnline.com</h2>
<p> World's no.1 shopping website</p>
</header>
Test it Now

Output:

ABCOnline.com

World's no.1 shopping website


Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<header>YesYesYesYesYes
Next TopicHTML hr Tag




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf