reading-notes

HTML & CSS Continued

HTML Media

Using media in HTML is a really fun part of building a website and making it look nice. In a lot of instances custom images are crucial to communicating a brand image or products that are sold. So learning to integrate them skillfully is extremely important

  1. What is a real world use case for the alt attribute being used in a website?

Alt is used to give textual context to an image. It’s really there to be helpful in terms of accessibility and if someone uses a screen reader then they can understand what image is supposed to be there. It can really help if your image doesn’t load for some reason and it will at least tell people what was supposed to be there.

  1. How can you improve accessibility of images in an HTML document?

You can improve the accessibility of images in an HTML by using things like the alt tag as well as thefigcaption tag to let users know what they are looking at. It helps with building the captions for the images as well as improves screen reader accessibility.

  1. Provide an example of when the figure element would be useful in an HTML document.

The figure element is really helpful when you want to style images or help out with screen readers, this allows you to link the image to the caption and you can also use it to help design your website with CSS. Otherwise your HTML could look a mess.

  1. Describe the difference between a gif image and an svg image, pretend you are explaining to an elder in your community.

A Gif image is a good choice for a simple image, it’s often used for simple animations. While a svg image is great for user interface elements, icons, or diagrams that have to be accurate when they are different sizes.

  1. What image type would you use to display a screenshot on your website and why?

I would use a WebP type for a screenshot so that I can have a good high quality still image and have excellent compression. It is also an incredibly popular image type so there is a really good accessibility with using that as an option.

Continuing CSS

  1. Describe the difference between foreground and background colors of an HTML element, pretend you are talking to someone with no technical knowledge.

The difference between foreground and background colors are pretty straightforward. Think about what you want to show up front and have as a primary focus, that is your foreground color. So you want your text to be back against a white background, your foreground is the black color element while the background element is now white.

  1. Your friend asks you to give his colorless blog website a touch up. How would you use color to give his blog some character?

I would use a combination of contrasting and complementary colors to bring some life and definition to their website. I would use color choices to link similar threads throughout the website and use them consistently to create a colorscheme that goes with their intention. I could make the text fun colors or the borders on things, there is so much you could beautify.

  1. What should you consider when choosing fonts for an HTML document

When choosing fonts for an HTML document you want to make sure that you are using a web safe font, thats a font that is commonly used and available to all browsers and will be able to load on someones page without issue. You can use a font-family to ensure that if your first few font’s don’t work then you will keep choosing until you get to one that persons computer has.

  1. What do font-size, font-weight, and font-style do to HTML text elements?

Font-Size changes the size of the text as displayed on the page. Often displayed in px or Pixels, other uses are em or rem. Font-weight lets you know how bold the text will be, how heavy it will be on the page. You can use things like light, or normal or bold or use a numeric scale to indicate weight. Font Style is often used to turn on styling of the font like italics or oblique

  1. Describe two ways you could add spacing around the characters displayed in an h1 element.

You could use either letter-spacing or word-spacing to get some room around the characters in your h1 element. Letter spacing will space individual letters while word spacing will keep the words together and then space them apart.