Giter Site home page Giter Site logo

dsc-css-code-along-nyc-ds-033020's Introduction

CSS Code Along

Introduction

It's time to see some CSS code in action. Codepen is a great tool to easily test HTML and CSS code that you'll see in practice here.

Objectives

You will be able to:

  • Use Codepen to preview and modify HTML and CSS files
  • Comment and uncomment CSS and HTML

Code Example HTML Structure

This Pen (saved Codepen document) contains an HTML document with the following structure:

  • A <body> element (root of the html content. In Codepen you will not see a body tag, it's implicitly present and wraps all the HTML content)
  • An <article> tag to define our content as self-contained unit (e.g. blog post, newspaper article)
  • An <h1> tag to wrap the <article>'s header text
  • <p> tags to wrap the <article>'s unstructured text
  • <ul> tags to represent unordered lists
  • <li> tags to wrap each list item

Code Example CSS Structure

The Pen also includes commented-out CSS Code to:

  • Set the background of the <body> element (whole document) to #00b3e6 (light blue)
  • Sets the <article> element width to 700px
  • Centers the <article> element
  • Sets the font family of the <article> element to Helvetica Neue. Alternative fonts are provided in the event Helvetica Neue is not available on your computer
  • Set the background of the <article> element to white
  • Add 30px of white space to the perimeter of the <article>
  • Set the font-size to 22px for the element with id main-header
  • Set the font-style to italic for elements containing the class perspective-questions

Code Along Instructions

Open the Pen in a separate browser tab to follow the code along instructions.

All the CSS code you need to successfully modify the page is already included but commented out. All you need to do is uncomment all the CSS declarations (property-name:value) one-by-one.

Pen Screenshot

Unstyled HTML Document Screenshot

Styled HTML Document Screenshot

CSS Declarations Uncommenting Steps

Summary

Awesome! In this code along you got to preview and practice a standard web development environment and modify CSS code! Specifically, you used Codepen to modify HTML and CSS files. You also learned how commenting/uncommenting works in CSS and HTML!

dsc-css-code-along-nyc-ds-033020's People

Contributors

cheffrey2000 avatar loredirick avatar mas16 avatar mathymitchell avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.