1. Dark mode pictures
This is how you can display different pictures in dark mode:
More on this topic on the article below:
![mustapha](https://res.cloudinary.com/practicaldev/image/fetch/s--rogKjLRP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--tXIALQ8l--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/174804/cb831252-9db8-4f7a-a600-0bf8db47b92f.png)
Responsive images for better performance: Start using srcset and picture
Mustapha Aouas ใป Nov 8 '21 ใป 5 min read
ย
2. HTML lang attribute
In HTML, the lang attribute specifies the language in which a content is written in and it can be used to help search engines index your site:
ย
3. CSS :lang
You can use the :lang
pseudo-class to target elements based on the language they are determined to be in. Here is an example:
ย
Hi there! I'm Mustapha, a technical writer, speaker and a passionate JS / TS developer. Follow me on Twitter for daily tech tips ๐
ย
4. No script
Use the <noscript>
element to provide alternative content for browsers that do not support scripting, or in which javascript has been disabled:
ย
5. Devtools tip: Last evaluated expression
You can access the most recently evaluated expression by typing $_
in the console:
ย
ย
That's all for now. I hope you found this useful!
Leave a comment to let me know which tip (if any) you found useful โคต
Until next time, have a nice week!
ย
Top comments (3)
Really useful!
Thank you! ๐
cool