Jump to content
number47

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

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...