I wanna create my first web page but encountered a problem.
I have the following code:
<img src="img/logo.png" alt="logo" />
<h1>My website name</h1>
I want to know how to make the logo and the H1 to be in the same line. Thanks!
I wanna create my first web page but encountered a problem.
I have the following code:
<img src="img/logo.png" alt="logo" />
<h1>My website name</h1>
I want to know how to make the logo and the H1 to be in the same line. Thanks!
Try this:
in your css file do
img { float: left; }
andh1 {float: left; }
Just stick the img tag inside the h1 tag as part of the content.
Check this.
If your image is part of the logo why not do this:
Use CSS to style it better.
And it is also best practice to make your logo a hyperlink that take the user back to the home page.
So you could do: