Day 1: title formatting coherence, other edits

This commit is contained in:
Elizabeth Craig
2019-03-05 02:20:22 -08:00
parent 886738d12a
commit 8c99c83353
17 changed files with 133 additions and 104 deletions

View File

@@ -1,6 +1,6 @@
## CSS Demo
# Step 1.2 - Introduction to CSS (Demo)
### CSS Properties
## CSS properties
Now that we've gone over adding HTML tags to the page, let's cover adding styles to those tags. We can do quite a lot with styles! We can change:
@@ -15,7 +15,7 @@ Now that we've gone over adding HTML tags to the page, let's cover adding styles
CSS styles are always written in `property: value` pairs (like `background: blue;`) and terminated with a semicolon.
### Applying CSS to an HTML file
## Applying CSS to an HTML file
CSS can be applied to HTML tags in three different ways.
@@ -25,7 +25,7 @@ CSS can be applied to HTML tags in three different ways.
3. Through an external CSS file
- `<link rel="stylesheet" href="./css-demo-finished.css" />`
### Targeting specific elements
## Targeting specific elements
Inline styles are always applied directly to the element you place them on, but `<style>` tags and external CSS files need a way to match elements with their respective style sets. This is done with **[CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)**. When selectors are combined with CSS styles, we call this a **ruleset**.

View File

@@ -0,0 +1,3 @@
# Step 1.2 - Introduction to CSS (Exercise)
See index.html from [npm start](http://localhost:8080/step1-02/exercise/) or the [live site](https://microsoft.github.io/frontend-bootcamp/step1-02/exercise/) for the exercise.

View File

@@ -10,22 +10,22 @@
data-default-tab="html,result"
>
<pre data-lang="css">
/* 1. */
/* 1. */
/* 2. */
/* 2. */
/* 3. */
/* 3. */
/* 4. */
/* 5. */
/* 5. */
/* 6. */
/* 6. */
/* Bonus */
</pre>
<pre data-lang="html">
&lt;!-- Without changing the below markup apply the styles asked for in the markup. Do not apply styles that a tag doesn't ask for -->
&lt;!-- Without changing the HTML markup, apply the styles asked for in the markup. Do not apply styles that a tag doesn't ask for. -->
&lt;section&gt;
&lt;h2&gt;1. Text Color: Red&lt;/h2&gt;
@@ -38,7 +38,7 @@
&lt;/ul&gt;
&lt;div class=&quot;myClass&quot;&gt;4. Background Green&lt;/div&gt;
&lt;div class=&quot;myClass otherClass&quot;&gt;
5. Background Green &amp; Color White
5. Background Green &amp; Color White
(Hint Qualified Selector)
&lt;/div&gt;
&lt;div id=&quot;myId&quot; class=&quot;otherClass&quot;&gt;6. Background Yellow&lt;/div&gt;