Responsive images are images that scale nicely to fit any browser size.
Using the width Property
If the CSS width property is set to 100%, the image will be responsive and scale up and down:
Notice that in the example above, the image can be scaled up to be larger than its original size. A better solution, in many cases, will be to use the max-width property instead.
Using the max-width Property If the max-width property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size
What is HTML Web Storage?
With web storage, web applications can store data locally within the user browser.
Before HTML5, application data had to be stored in cookies, included in every server request. Web storage is more secure, and large amounts of data can be stored locally, without affecting website performance.
Unlike cookies, the storage limit is far larger (at least 5MB) and information is never transferred to the server.
Web storage is per origin (per domain and protocol). All pages, from one origin, can store and access the same data. 0920328156
This is CS50x, Harvard University introduction to the intellectual enterprises of computer science
and the art of programming for majors and non-majors alike, with or without prior programming experience.
As of Fall 2015, the on-campus version of CS50x, CS50, was Harvard largest course.
Design for Mobile First
Always Design for Mobile First
Mobile First means designing for mobile before designing for desktop or any other device (This will make the page display faster on smaller devices).
This means that we must make some changes in our CSS.
Instead of changing styles when the width gets smaller than 768px, we should change the design when the width gets larger than 768px. This will make our design Mobile First:
Navigation available in Bootstrap share general markup and styles, from the base .nav class to the active and disabled states.
Swap modifier classes to switch between each style.
The base .nav component is built with flexbox and provide a strong foundation for building all types of navigation components. It includes some style overrides (for working with lists), some link padding for larger hit areas, and basic disabled styling. 0920328156
Create responsive video or slideshow embeds based on the width of the parent by creating an intrinsic ratio that scales on any device.
When executing scripts in an HTML page, the page becomes unresponsive until the script is finished.
Handling Events Handling events with React elements is very similar to handling events on DOM elements. There are some syntax differences:
React events are named using camelCase, rather than lowercase.
With JSX you pass a function as the event handler, rather than a string.
Dropdowns Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.
Form Elements This chapter describes all the different HTML form elements.
The input Element
One of the most used form element is the input element.
The input element can be displayed in several ways, depending on the type attribute.
Background Images Different Images for Different Devices
A large image can be perfect on a big computer screen, but useless on a small device. Why load a large image when you have to scale it down anyway? To reduce the load, or for any other reasons, you can use media queries to display different images on different devices.