Jump to content

w3schools, lately it seems to be giving inconsistencies, what properties, html


number47

Recommended Posts

It seems like I have been trying to display HTML img images and not very sure of the proper syntax.

 

"HOW TO MAKE IMAGE NOT A BACKGROUND IMAGE

BUT A PHOTO FOCAL POINT"

"PROBLEM IS HOW TO PROPERLY INSERT A IMAGE. WHAT IS THE BEST WAY. AND WHERE TO ADD ATTRIBUTES OF THE FILE.",

there must be several ways some tend to overlap and Is that ok good or bad?

seems that I have to enter the style in HTML file after the img for it to take?

 

I have been getting mixed results over some times, It seems to me that there is many ways to do everything. there is different way to achieve images in html

 

I think I get confused because of css and the image-position and various selectors,like img or is it better to have it in a div element. or CSS having a URL to display the image like this |img { background-image: url=("")?

 

What is the best way to have elements that are active images.

 

** what is the most universal excepted and accurately displayed method of sizeing images??** ---≥ example (size of width="10"; or width:10; or width="10px, or width:10px; or width=10% or ? what is the always excepted method?

 

I keep on refferring to tutorials and refferences and I get different methods of HTML <img> and I cannot seem to get the most common and most workable what I would call the "best way to do this".

 

Please if you will help? thankyou

Edited by number47
Link to comment
Share on other sites

There's HTML and then there's CSS. You should read the W3Schools tutorials to see where on the page each one goes.

 

If you want the image to be part of the content of the page, something that the user is meant to look at, then you use an <img> tag. If the image is just there for decoration and the page wouldn't lose its meaning without it, then you use the CSS background-image property.

 

In HTML, the width and height attributes do not have units, so width="500px" is incorrect, it should be width="500". In CSS all values must specify what units are being used, so width: 10; is incorrect and it should be width: 10px; or width: 10em; or width: 10%;

 

The width and height HTML attributes are used to tell the browser to reserve space for the image while the image is loading. You should use CSS for more precise control over the size of the image.

Link to comment
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
×
×
  • Create New...