Tech Tutorial: Learning Cascading Style Sheets (CSS) – Episode 05: Type Selectors

When using CSS to style elements within an HTML document, you must first grab a hold of the specific element(s) you want to style (we call this obtaining a reference). CSS provides several methods for targeting HTML elements for styling. One such method is the use of type selectors, which is selecting HTML elements by their element type. For example, selecting all anchor tags in order to change the color of links within the page.

Personal Recommendation (unpaid)
Programming and software development are awesome! Being that you are learning along with me, there is a really good chance you can make this a career. Based on my own life experience, let me suggest to you that you go get a Computer Science degree from Neumont College of Computer Science and kick your life into hyper-drive.

visit: https://www.neumont.edu/

Tech Tutorial: Learning Cascading Style Sheets (CSS) – Episode 04: External Styles

CSS has several methods for including the code that affects HTML document styling. One such method is the use of external styles. In this video, you will learn how to use external styles to effectively change the look and feel of an HTML document.

Personal Recommendation (unpaid)
Programming and software development are awesome! Being that you are learning along with me, there is a really good chance you can make this a career. Based on my own life experience, let me suggest to you that you go get a Computer Science degree from Neumont College of Computer Science and kick your life into hyper-drive.

visit: https://www.neumont.edu/

Tech Tutorial: Learning Cascading Style Sheets (CSS) – Episode 03: Internal Styles

CSS has several methods for including the code that affects HTML document styling. One such method is the use of internal styles. In this video, you will learn how to use internal styles to effectively change the look and feel of an HTML document.

Personal Recommendation (unpaid)
Programming and software development are awesome! Being that you are learning along with me, there is a really good chance you can make this a career. Based on my own life experience, let me suggest to you that you go get a Computer Science degree from Neumont College of Computer Science and kick your life into hyper-drive.

visit: https://www.neumont.edu/

Tech Tutorial: Learning Cascading Style Sheets (CSS) – Episode 02: In-line Styles

CSS has several methods for including the code that affects HTML document styling. One such method is the use of in-line styles. In this video, you will learn how to use in-line styles to effectively change the look and feel of an HTML document.

Personal Recommendation (unpaid)
Programming and software development are awesome! Being that you are learning along with me, there is a really good chance you can make this a career. Based on my own life experience, let me suggest to you that you go get a Computer Science degree from Neumont College of Computer Science and kick your life into hyper-drive.

visit: https://www.neumont.edu/

Tech Tutorial: Learning Cascading Style Sheets (CSS) – Episode 01: What is CSS and how does it Work?

If HTML is the structure of a document, you can think of CSS as the documents makeup. Cascading Style Sheets are used by web designers and web developers to determine the look and the feel of an HTML document.

CSS is used to specify:

  • Coloring
  • Positioning
  • Sizing
  • Visibility
  • Attributes of Text (font, color, style)
  • Animations
  • Interactions

Personal Recommendation (unpaid)
Programming and software development are awesome! Being that you are learning along with me, there is a really good chance you can make this a career. Based on my own life experience, let me suggest to you that you go get a Computer Science degree from Neumont College of Computer Science and kick your life into hyper-drive.

visit: https://www.neumont.edu/

JavaScript: Unobtrusive

It all comes down to separation of concerns. When programming, separation of concerns deals with creating clear and concise boundaries between application components that have different responsibilities but work together to carry out a common overarching goal. So it is with the development of web user interfaces using HTML5, CSS3, and JavaScript. Each of these technologies work together to create interactive and beautiful user interfaces within the browser, but they each have very specific jobs that make these interfaces possible.

HTML: structures content in a very semantic (meaningful) and ordered way.

CSS: beautifies HTML by adding visual enhancements such as color, gradients, borders, padding, margin, fonts, animations, and  positioning.

JavaScript: adds behavior to HTML, allowing HTML to respond to DOM events as users interact with the web page within the browser.

Together these three technologies create a very powerful tool set for the modern web developer and web user interface designer. The difficult part for most web developers is not allowing the three, very closely related technologies, to bleed across their boundaries into each other creating tightly coupled code. This tightly coupled code is usually a result of CSS and JavaScript being placed directly in the HTML.

Unobtrusive method to the rescue. Merriam-Webster defines the word unobtrusive as not attracting attention in a way that bothers or annoys. Well, mashed together HTML, CSS, and JavaScript is bothersome and extremely annoying, especially when it comes to maintainability and defect repair. For this reason developers have begun to make sure their web user interfaces are completely separated. This is accomplished by following a few specific rules:

HTML

  1. keeping HTML markup in separate files

CSS

  1. keeping CSS markup in separate files
  2. referencing those files in the ‘head’ element of the HTML files
  3. never use ‘style’ elements in HTML
  4. never use ‘style’ attributes on HTML elements

JavaScript

  1. keeping JavaScript markup in separate files
  2. referencing those files in the ‘head’ element or at the bottom of the ‘body’ element of the HTML files
  3. never use ‘script’ elements to hold JavaScript code in HTML
  4. only use ‘script’ elements to references a JavaScript file
  5. never use HTML element attributes that bind to DOM events such as ‘onclick’ or ‘onmouseenter’

Unobtrusive JS Example:

<!--DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>JavaScript Event Binding</title>
    <script src="jsEventBinding.js"></script>
</head>
<body>
    <div id="click-me">Click Me</div>
</body>
</html>
/**
 * Created by Tim on 9/9/14.
 */

'use strict';

var elem = document.getElementById('click-me'); // a DOM element
elem.onclick = function () {
    // Do something nifty here
};