Change Color of Fonts in DIV (CSS)

Your first CSS selector—social.h2—is looking for the “social” element in the “h2”, class, e.g.: Class selectors are proceeded with a dot (.). Also, use a space () to indicate that one element is inside of another. To find an <h2> descendant of an element in the social class, try something like: To get a better understanding of CSS selectors … Read more

An invalid form control with name=” is not focusable

This issue occurs on Chrome if a form field fails validation, but due to the respective invalid control not being focusable the browser’s attempt to display the message “Please fill out this field” next to it fails as well. A form control may not be focusable at the time validation is triggered for several reasons. The two … Read more

Show/hide ‘div’ using JavaScript

How to show or hide an element: In order to show or hide an element, manipulate the element’s style property. In most cases, you probably just want to change the element’s display property: Alternatively, if you would still like the element to occupy space (like if you were to hide a table cell), you could change the element’s visibility property instead: … Read more

When to use instead

?

You should keep in mind, that HTML is intended to DESCRIBE the content it contains. So, if you wish to convey a paragraph, then do so. Your comparison isn’t exactly right, though. The more direct comparison would be When to use a <div> instead of a <p>? as both are block level elements. A <span> is inline, much like an … Read more