Class 5
Back to home page
Q. What is a real world use case for the alt attribute being used in a website?
- The alt attribute is used if for when the image cannot be shown, and instead it pops up the text that was written there. for example is an image isnt properly linked it would show the alternate text.
Q. How can you improve accessibility of images in an HTML document?
- Setting alt text, adding a title to the image, and adding width and height to the image for proper sizing.
Q. Provide an example of when the figure element would be useful in an HTML document.
- You use the fig element when there are tons of images. It will provide a semantic container and clearly state the caption of the image.
Q. Describe the difference between a gif image and an svg image, pretend you are explaining to an elder in your community.
- a gif is not resolution dependent while a svg is. This means that a gif will look pixilated and gross depending on the scaling of a webpage, while a svg is not so it will look good whatever the scaling.
Q. What image type would you use to display a screenshot on your website and why?
- a png because its more precise reproduction of the source image, meaning it takes a better quality shot.
Learn CSS
Q. Describe the difference between foreground and background colors of an HTML element, pretend you are talking to someone with no technical knowledge.
- Foreground color is the text color, while the background is the color of the page itself. For example in an element, the content is the foreground, and the padding is the background.
Q. Your friend asks you to give his colorless blog website a touch up. How would you use color to give his blog some character?
- adding like color combinations to things like text, border, and background to set a theme depending on the topic of the blog.
Q. What should you consider when choosing fonts for an HTML document?
- First i would have to make sure its a web safe font, meaning it will appear on the browser my webpage is running on. Foreground, size and weight are things i would consider as well to make sure the font is still readable and not to big or small.
Q. What do font-size, font-weight, and font-style do to HTML text elements?
- Font size measures how big the text will be, font weight will measure how bold the font is, and font style will turn italics on or off.
Q. Describe two ways you could add spacing around the characters displayed in an h1 element.
- line height is the easiest way, but you can also use padding to make space for the h1. Maybe text align as well but im not sure.
Things I want to learn more about.
Looking more into styling with fonts interests me, i didnt realize you could do way more with the actual text then i thought. As well as looking more into the box-model in css.