Skip to content

alicht/intro-html-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Objectives

  • Github
  • HTML
  • CSS
  • about.me page

1. Git & GitHub

Why Git?

Git is a form of Version Control. Version Control is the process of storing multiple versions of a single project, allowing each version to be recalled at a later date. (Ex: backing up your iPhone before you get it repaired).

As developers our code is our livelihood so it's important that we safely and frequently store our work. Not only that, we want to track our changes as we make them. If we make a feature that ends up breaking the rest of our app we want to be able to go back to a point when our app was last working.

But... who cares why would we need this?

Using version control is useful because we can easily rollback to a previous version of our application, saving us a ton of extra work and time. There are a lot of advantages to version control.

  • it's a great way to keep a backup of your work
  • it facilitates collaboration
  • it gives us the freedom to experiment and try new things without messing up the code base.

let's make a local repository and create the files we'll be using for today

connecting to Github

Introducing GitHub!

So we have a local repository, but now let's use GitHub to create our remote repository. Why use GitHub? So we can backup our code online. It also has an stellar graphical interface and useful collaboration features.

If you work by yourself, you don't really need remotes. However, we want to work with others! Thus let's talk about remotes.

Let's create a remote repository on GitHub

  • let's go to GitHub, click the BIG plus sign in the menubar and select New repository.
  • let's enter a name for our repository in the repository name field.

Lets connect our local repo and our remote repo

mg1

  • since we already have a repo we'll follow step 2
  • go to terminal
  • lets add the URL we copied to
  • git remote add
  • git remote push

Connected!

2. HTML

used for inputting and arranging all the visible contetn on a website.

  • building blocks of HTML are elements
  • content
  • tags can create headings, paragraphs, links
  • HTML5 just means the most up to date features of HTMl that incorporates new properties such as ________
  • < h1> to < h6> tags

lets create an index.html file

here's the boilerplate HTML code we'll want to enter in our HTML file:

<!DOCTYPE html>
<html>
  
  <head>
    <link rel="stylesheet" type="css" href="style.css" />
    <title>Title Goes Here</title>
  </head>
  
  <body>
  
  </body>
  
</html>

Add some content and then open in browser

let's add a couple of hyperlinks

  • I love <a href="espn.com"> sports </a>.

Anchor Elements create links. In order to make a working link, we need to add more information to the anchor tag using an (href) attribute that detemines the link's destination.

<a href="http://www.generalassemb.ly"> This would make this whole sentence a link to General Assembly's home page.</a>

Semantic elements in HTML

https://www.w3schools.com/html/html5_semantic_elements.asp

3. CSS

screen shot 2017-12-06 at 12 33 04 am

what would this do to our HTML code on our page?

h1 {
  color: blue;
  background-color-yellow;
}

Box Model

much more intricate CSS

http://www.mezzoblue.com/zengarden/alldesigns/

  • can select hex colors to color image

fonts and text

  • can change these too

classes and IDs

What's the difference between the two?

In CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded by a hash character (“#”). The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one.

screen shot 2017-12-06 at 12 42 14 am

images

<!img src="https://www.w3schools.com/images/w3schools_green.jpg" alt="W3Schools.com">

Elk Web Design

let's take a look at this JSbin sample of HTML & CSS

What is Responsive Web Design?

Responsive web design makes your web page look good on all devices.

Responsive web design uses only HTML and CSS.

Setting The Viewport

HTML5 introduced a method to let web designers take control over the viewport, through the tag.

You should include the following viewport element in all your web pages:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

A viewport element gives the browser instructions on how to control the page's dimensions and scaling.

The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).

The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.

screen shot 2017-12-06 at 7 09 55 am

here's an example of what it would look like in action

Media Query

excellent explanation of media queries

4. Lab - About Me Page

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors