Source 44

0 views
Skip to first unread message

Tamela

unread,
Aug 5, 2024, 3:58:30 AM8/5/24
to kenaliscons
TheHTML element specifies one or more media resources for the , , and elements. It is a void element, which means that it has no content and does not require a closing tag. This element is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats.

Each string in the list must have either a width descriptor or a pixel density descriptor to be valid. These two descriptors should not be used together; only one should be used consistently throughout the list. The value of each descriptor in the list must be unique. The browser chooses the most adequate image to display at a given point of time based on these descriptors. If the descriptors are not specified, the default value used is 1x. If the sizes attribute is also present, then each string must include a width descriptor. If the browser does not support srcset, then src will be used for the default image source.


The list consists of source sizes separated by commas. Each source size is media condition-length pair. Before laying the page out, the browser uses this information to determine which image defined in srcset to display. Note that sizes will take effect only if width descriptors are provided with srcset, not pixel density descriptors (i.e., 200w should be used instead of 2x).


For information about image formats supported by web browsers and guidance on selecting appropriate formats to use, see our Image file type and format guide. For details on the video and audio media types you can use, see the Media type and format guide.


This example demonstrates how to offer a video in different formats: WebM for browsers that support it, Ogg for those that support Ogg, and QuickTime for browsers that support QuickTime. If the or element is not supported by the browser, a notice is displayed instead. If the browser supports the element but does not support any of the specified formats, an error event is raised and the default media controls (if enabled) will indicate an error. For more details on which media file formats to use and their browser support, refer to our Media type and format guide.


This example demonstrates how to offer an alternate source file for viewports above a certain width. When a user's browsing environment meets the specified media condition, the associated element is chosen. The contents of its src attribute are then requested and rendered. If the media condition does not match, the browser will move on to the next in the list. The second option in the code below has no media condition, so it will be selected for all other browsing contexts.


In this example, two elements are included within , providing versions of an image to use when the available space exceeds certain widths. If the available width is less than the smallest of these widths, the browser will fall back to the image specified in the element.


In this example, three elements with height and width attributes are included in a element. A media query allows the browser to select an image to display with the height and width attributes based on the viewport size.


\n In this example, three elements with height and width attributes are included in a element.\n A media query allows the browser to select an image to display with the height and width attributes based on the viewport size.\n


As a public charity organization, OSI is supported by donations of corporations and individuals. Thanks to our sponsors that support our vision to be the leading voice on policies and principles of Open Source.


The content on this website, of which Opensource.org is the author, is licensed under a Creative Commons Attribution 4.0 International License.



Opensource.org is not the author of any of the licenses reproduced on this site. Questions about the copyright in a license should be directed to the license steward. Read our Privacy Policy


Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose.[1][2] Open-source software may be developed in a collaborative, public manner. Open-source software is a prominent example of open collaboration, meaning any capable user is able to participate online in development, making the number of possible contributors indefinite. The ability to examine the code facilitates public trust in the software.[3]


Open-source software development can bring in diverse perspectives beyond those of a single company. A 2024 estimate of the value of open source software to firms is $8.8 trillion as firms would need to spend 3.5 times the amount they currently do without the use of open source software.[4]


Open-source code can be used for studying and allows capable end users to adapt software to their personal needs in a similar way user scripts and custom style sheets allow for web sites, and eventually publish the modification as a fork for users with similar preferences, and directly submit possible improvements as pull requests.


The Open Source Initiative's (OSI) definition is recognized by several governments internationally[5] as the standard or de facto definition. OSI uses The Open Source Definition to determine whether it considers a software license open source. The definition was based on the Debian Free Software Guidelines, written and adapted primarily by Perens.[6][7][8] Perens did not base his writing on the "four freedoms" from the Free Software Foundation (FSF), which were only widely available later.[9]


Under Perens' definition, open source is a broad software license that makes source code available to the general public with relaxed or non-existent restrictions on the use and modification of the code. It is an explicit "feature" of open source that it puts very few restrictions on the use or distribution by any organization or user, in order to enable the rapid evolution of the software.[10]


According to Feller et al. (2005), the terms "free software" and "open source software" should be applied to any "software products distributed under terms that allow users" to use, modify, and redistribute the software "in any manner they see fit, without requiring that they pay the author(s) of the software a royalty or fee for engaging in the listed activities."[11]


Despite initially accepting it,[12] Richard Stallman of the FSF now flatly opposes the term "Open Source" being applied to what they refer to as "free software". Although he agrees that the two terms describe "almost the same category of software", Stallman considers equating the terms incorrect and misleading.[13] Stallman also opposes the professed pragmatism of the Open Source Initiative, as he fears that the free software ideals of freedom and community are threatened by compromising on the FSF's idealistic standards for software freedom.[14] The FSF considers free software to be a subset of open-source software, and Richard Stallman explained that DRM software, for example, can be developed as open source, despite that it does not give its users freedom (it restricts them), and thus does not qualify as free software.[13]

3a8082e126
Reply all
Reply to author
Forward
0 new messages