1. Write a style declaration (or set of declatations) that will: (a) make "Fire Kingdom" red, and (b) make everything else grey.
<ul>
<li class="kingdoms">
Kingdoms
<ul>
<li id="fire_kingdom">Fire Kingdom</li>
// oop.rb | |
class Animal | |
# properties | |
attr_accessor :name, :last_ate | |
# constructor | |
def initialize( name ) | |
@name = name | |
puts "made an Animal named #{name}" |
// oop.py | |
# class definition (blueprint) | |
class Animal: | |
# class constructor method | |
def __init__(self, name): | |
# instance properties | |
self.name = name | |
self.last_ate = None |
// oop.js | |
// Class Definition (is Capitalized) | |
function Animal ( name ) { | |
// class constructor | |
// instance properties | |
this.name = name; | |
this.last_ate = null; | |
console.log('created a new Animal named', this.name); |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Out of This World</title> | |
<link rel="stylesheet" href="/stylesheets/styles.css"> | |
</head> | |
<body> | |
<header> | |
<h1 id="title">Cosmos</h1> | |
<h2 id="subtitle">Hearts of the Stars Euclid</h2> |