For <img> tags, are the width and height attributes necessary? Could they just
be omitted?
dm 7 6865
On Thu, 04 Nov 2004 10:07:31 -0800, DM <elektrophyte-yahoo> wrote: For <img> tags, are the width and height attributes necessary? Could they just be omitted?
They are not required but I recommend their use.
Without this information in the HTML, the UA cannot account for the
viewport space needed for the image. As a result, it happens that if the
user is reading below the image, suddenly the UA discovers the dimensions
and the whole page jumps disconcertingly .
And it's important to be sure the values of height and width are the exact
pixel dimension of the image being used. Don't resize images in the
browser, it leads to either a heftier download than is needed (when HTML
reduces size) or a pixellated ugly image (when HTML increases size).
On Thu, 04 Nov 2004 13:28:12 -0500, Neal <ne*****@yahoo. com> wrote: On Thu, 04 Nov 2004 10:07:31 -0800, DM <elektrophyte-yahoo> wrote:
For <img> tags, are the width and height attributes necessary? Could they just be omitted?
They are not required but I recommend their use.
And apologies for the crosspost - followups are now set to ciwah.
Neal wrote: On Thu, 04 Nov 2004 10:07:31 -0800, DM <elektrophyte-yahoo> wrote:
For <img> tags, are the width and height attributes necessary? Could they just be omitted?
They are not required but I recommend their use.
Without this information in the HTML, the UA cannot account for the viewport space needed for the image. As a result, it happens that if the user is reading below the image, suddenly the UA discovers the dimensions and the whole page jumps disconcertingly .
And it's important to be sure the values of height and width are the exact pixel dimension of the image being used. Don't resize images in the browser, it leads to either a heftier download than is needed (when HTML reduces size) or a pixellated ugly image (when HTML increases size).
Thanks for the reply. On a related question, if you do provide width and height
attributes, does it matter whether you use <img> tag or CSS attributes?
On Thu, 04 Nov 2004 10:32:14 -0800, DM <elektrophyte-yahoo> wrote: Thanks for the reply. On a related question, if you do provide width and height attributes, does it matter whether you use <img> tag or CSS attributes?
If you provide the height and width in content, the CSS values are not
necessary. Remember that a page can be loaded with images and without CSS.
Whenever the image is part of the HTML, the height and width should be in
the HTML as well.
"DM" <elektrophyte-yahoo> wrote in message
news:41******** *************@n ews.cablerocket .com... Neal wrote:
On Thu, 04 Nov 2004 10:07:31 -0800, DM <elektrophyte-yahoo> wrote:
For <img> tags, are the width and height attributes necessary? Could they just be omitted?
They are not required but I recommend their use.
Without this information in the HTML, the UA cannot account for the viewport space needed for the image. As a result, it happens that if the user is reading below the image, suddenly the UA discovers the dimensions and the whole page jumps disconcertingly .
And it's important to be sure the values of height and width are the exact pixel dimension of the image being used. Don't resize images in the browser, it leads to either a heftier download than is needed (when HTML reduces size) or a pixellated ugly image (when HTML increases
size). Thanks for the reply. On a related question, if you do provide width and
height attributes, does it matter whether you use <img> tag or CSS attributes?
You should do it in the HTML. The height and width of an image are actual
attributes of the image, they're not presentational suggestions. And then
there's no need to do it in the CSS.
*Neal* <ne*****@yahoo. com>: On Thu, 04 Nov 2004 10:07:31 -0800, DM <elektrophyte-yahoo> wrote:
For <img> tags, are the width and height attributes necessary?
They are not required but I recommend their use.
For purely decorative images, which correctly have empty 'alt' texts, they
should be omitted, though. Not all of these should or could be included
per CSS.
F'up2 comp.infosystem s. www.authoring.html
--
Useless Fact #4:
Coca Cola was originally green.
*Neal* <ne*****@yahoo. com>: On Thu, 04 Nov 2004 10:07:31 -0800, DM <elektrophyte-yahoo> wrote:
For <img> tags, are the width and height attributes necessary?
They are not required but I recommend their use.
For purely decorative images, which correctly have empty 'alt' texts, they
should be omitted, though. Not all of these should or could be included
per CSS.
F'up2 comp.infosystem s. www.authoring.html
--
Useless Fact #9:
Percentage of Africa that is wilderness: ca. 28%.
Percentage of North America that is wilderness: ca. 38%. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David D. |
last post by:
If an <IMG> specifies a WIDTH but not a HEIGHT, then height is internally
determined so as to maintain the image's aspect ratio.
Aspect ratio is also preserved if HEIGHT but not WIDTH is specified.
What is the value of an unspecified HEIGHT or WIDTH attribute. How do I
dynamically set the attribute to unspecified, after having previously used
the <IMG> with explicit HEIGHT and WIDTH attributes?
- David
|
by: Ana |
last post by:
I just ran a report on a site I'm redesigning and came up with all these
missing height/width tags. How important are they? Should I go through the
trouble of making sure they're there?
Ana
|
by: DM |
last post by:
For <img> tags, are the width and height attributes necessary? Could they just
be omitted?
dm
|
by: xiko tripa |
last post by:
Hi. I have an apsx page with a Panel inside. The panel has his
properties Width and Height set to 590 and 390 respectively.
I call a function to make up an table inside this panel. That table
has 2 columns. The size of the first one has 2/3 of the panel.width
and the size of the second one has 1/3 of the panel.width.
The only way I got to calculate these values was:
private void MakeCentralTable(Panel panel)
|
by: Blake Versiga |
last post by:
After pulling an image from the data base and the Image.Height and
Image.Width are not set to the ImageURL's attributes.
1) Is there a way to have these properties updated? or
2) How do I get the image height and width to store?
Thanks in advance.
Blake Verisga
| |
by: Robson Carvalho Machado |
last post by:
Dear friends,
I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an
1px transparent image only to determine link position, but as I create this
link dynamically I could not set image width. This problem makes my link
clickable only on its borders.
When viewing HTML source I could see that spacer.gif has no width and
height, so HTML shows only 1px x 1 px image.
|
by: Dotcom |
last post by:
I have an ASP.NET application that is mysteriously acquiring height and width
attributes on a particular IMG element on multiple pages. This is not being
caused by someone editing or uploading new copies of the files.
There are various scripting and "active" technologies enabled on the server:
ASP.NET
ASP
Front Page Extensions
Perl
|
by: Phil Endecott |
last post by:
Dear Experts,
It looks as if the HTML4 spec does not define a meaning for empty height
and width attributes in an IMG element. Moz seems to ignore them, while
IE7 sets the dimension to 1 pixel (or something like that).
I have a vague recollection that "" did have a defined meaning at some
point in the past, but maybe I am mis-remembering. Can anyone confirm?
I have encountered this in some third-party PHP code that I'm using on
|
by: Christian Hackl |
last post by:
Hi everyone,
I've got a question about what makes the "img" element's width/height
attributes valid HTML or XHTML.
First of all, this is a rather theoretical question, but digging through
the W3C HTML 4.01 standard and this group's archive didn't give me a
satisfactory answer, so here we go:
Is <img src="img.png" alt="" width="100px" height="100px"really valid?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |