Jump to content
18 hours ago, Technicolors said:

use <br>

 

7 hours ago, itamaradam said:

try putting "teachers" in a div/use <br>

While both of these will Technically do what you want they are not the Correct way to do this..

To quote W3C standards

Quote

br elements must be used only for line breaks that are actually part of the content, as in poems or addresses.

You should try to achieve what you want with CSS.

For example you could assign a class to the image 

<img src="flc.jpg"  alt='LOGO'  id="MainLogo"/>

The within your head add a style tag

<style>
  .MainLogo{
  	width:600px;
    	height:400px;
    	display:block;
  }
</style>

You could add the display to your style tag as you have but best practice is to separate the CSS from your HTML.

 

OK.. so an explanation for this..

 

Each element in your html has a property called "Display", for simplicity we will just consider the two values that matter here.. If you were to add borders to your code you would see how the elements appear on your page, something like this (i just used ms paint!)

image.png.9d4237f5fb0bf0c99e1b64603c858776.png

 

So the <P> tags by default are block elements,and will fill the remaining space in a web page - not allowing content to the right of them.

The <img> tag is inline-block, it will take up the space it requires but will allow blocks to the right of it, which is why "Teachers" is appearing to the left of it.

 

Hope this helps

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×