Images in HTML
Images can enhance the design and appearance of a webpage. In HTML, the <img> tag is used to embed and image, images are not directly inserted into the webpage but linked to it, and the <img> tag acts as a placeholder. This tag doesn’t require a closing tag and has two essential attributes: src to specify the images path and alt to provide alternate text in case the image cannot be displayed. The style attribute can be used to define the image’s width and height, and HTML supports animated images, such as GIFs.
Colors in web design
Colors in web design can be specified using predefined color names or through values like RGB, HEX, HSL, RGBA, and HSLA. In CSS, a color can be defined by a predefined color name and this can be applied to the background, text, or borders of HTML elements. The background color of an element can be set using simple CSS rules, providing flexibility in enhancing a webpage’s visual appeal.
CSS background properties
CSS background properties allow for the addition of background effects to elements. These properties include background-color, background-image, background-repeat background-attachment, and background-position. The background shorthand property simplifies combining multiple background properties into one line of code. Additionally, CSS allows the specification of color using different formats and also includes the opacity property to control the transparency of elements.