HTML header and link on the same line
2 answers
There are several ways to do this. The easiest and fastest way I can think of is to use a parent div and put a title and link in it. So your HTML will look like this:
<div class="test">
<h2>Heading comes here</h2><a href="">Link comes here</a>
</div>
Your styles can be as follows:
.test {
text-align: center;
}
h2 {
display: inline-block;
}
a {
float: right;
}
+9
source to share