Question: Consider HTML code below. In that code I am dynamically adding a DIV with a class "dynamic" and I am expecting that it would pick up the CSS attributes defined for that class which in turn would show a black square. The black square, however, never appears. Am I doing anything wrong here? If not, then is there a way to define CSS attributes upfront and dynamically add elements or should I always add css attributes to the element after it was added (which seems inconvenient). Thanks.

```
<!DOCTYPE html>

<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script>

$(function() {

    $("body").append(
        $("<div/>").attr("class", "dynamic")
    )

});

</script>

<html>
<head>
<style>

.dynamic {
    backgorund-color: black;
    width: 100px;
    height: 130px;
    left: 10px;
    top: 10px;    
}

</style>
</head>

<body>
</body>

</html>

```

Answer: 
In your class, you spelled background incorrectly:

```
.dynamic {
    background-color: black;
    width: 100px;
    height: 130px;
    left: 10px;
    top: 10px;    
}

```

I also recommend jQuery's `.addClass()` instead of `.attr()`

```
$("<div/>").addClass("dynamic")

```

<http://jsbin.com/qufeq/1/>
You have misspelled `background-color`. You might want to double-check your spelling in the future, because it is much easier to fix these trivial bugs than to wait for answers.