Pixels are a unit of measurement in CSS, just like inches or centimeters would be to us. A pixel on a user’s screen is one tiny dot of light. If you are setting a border to be a certain amount of pixels (px) wide, you are telling it to have a width that fills that many “pixels” on the user’s screen.
So, I’m trying to post a question separate to the pixel question already asked here. I’m not sure if I’m using this correctly. I could not find where to post a new topic about this exercise. If I’m doing this wrong please let me know!
Anyhow, in the ‘Border’ CSS exercise, 4/16 of the Box Model here, an H2 is used for text that is quoting the page’s own paragraphs. Wouldn’t an aside be more semantically appropriate here? An H2 on this page would seem more apt for a sub-heading rather than a quote. Am I wrong?
A lot of the HTML in these CSS lessons is not semantically correct/optimized. I’m not sure, but I think the course was not completely updated when the more semantic tags with HTML5 were released.
Although, the <blockquote> tag would seem, to me, to be more semantically appropriate.
Yes, the order of specifying border properties in CSS follows a specific convention, and it should be in the order of width, style, and color. The shorthand property for border, as well as the individual properties, adheres to this order:
How do I know how many pixels I need to use to make it look good? Is it just trial and error until you get a feeling for it? It doesn’t matter whether it’s pixel or cm…I just don’t know what would look good.
Determining the appropriate size for elements on a webpage (or any design project) can indeed be a combination of trial and error, experience, and sometimes adherence to design principles. Here are some factors to consider when deciding on pixel sizes:
Screen Resolution: Take into account the resolution of the devices your audience will be using. Higher resolution screens may require larger sizes for elements to maintain clarity and readability.
Typography: The size of text should be comfortable to read. For body text, a size between 16px and 18px is commonly used, but this can vary based on font choice and design aesthetics. Headings and other important text may be larger.
Whitespace: Allow enough space around elements to prevent crowding and improve readability. Margins and padding can help create visual breathing room.