How to create a header in html
- how to style header in css
- how to style heading in css
- how to style header tag in css
- how to style table header css
Html header example
Header background color html.
How to style a header with CSS?
To style a header with CSS, we can use various CSS properties to make it look attractive. In this article, we will learn and understand to style the header using diferent CSS properties.
Style header with CSS
Example
Here is the complete example code implementing above mentioned steps.
<!DOCTYPE html> <html> <head> <title> To style a header with CSS </title> <style> body { margin: 10px; } .header { padding: 30px; background-color: bisque; } .test { padding: 30px; background-color: #04af2f; } #head1 { font-style: oblique; text-align: center; } .head { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; text-align: center; color: white; } </style> </head> <body> <div class="header"> <h1 id="head1"> Styling header with CSS </h1> <p> For this header, we have used CSS font-style and text-align property to style the header.</p> </div> <div class="test"> <h1 class="head"> Welcome to Tutorials Point. </h1> <p> For this header, w
- css header styles examples