Course Content
Ultimate HTML
Attributes modify the properties and behavior of HTML elements. They can be optional or required. They are enclosed in double/single quotes ("..."
or '...'
) within the opening tag. Each tag has its own set of attributes. Multiple attributes can be used by separating them with a space.
index.html
index.css
index.js
Let’s consider some attributes of the <img/>
tag.
src
- Specifies the path to the image;
alt
- Specifies an alternate text for the image, if the image for some reason cannot be displayed;
width
- Specifies the image width;
height
- Specifies the image height
Let’s consider some <a/>
tag attributes
href
- specifies link destination;
target
- specifies in which tab the page supposed to be open
What attributes can be added to <img>
tag to get an image of 1280px width and 768px height?
Select the correct answer
Section 2.
Chapter 2