This is a solution to the News homepage challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the interface depending on their device's screen size
- See hover and focus states for all interactive elements on the page
- Solution URL: [https://github.com/xapzx/news-homepage]
- Live Site URL: [Add live site URL here]
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
During this project, I learnt about the uses of the 'picture' tag. Specifically, using the 'source' tag inside of it to change the image depending on the screen width.
To see how you can add code snippets, see below:
<picture>
<source srcset="assets/images/image-web-3-desktop.jpg" media="(min-width: 1000px)"/>
<img src="assets/images/image-web-3-mobile.jpg" alt="Image for Web 3.0" class="main-img">
</picture>