diff --git a/README.md b/README.md index 77d1b74..11b62d3 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,30 @@ HTML+CSS Tutorial ================= -###Who +### Who I'm Cassidy. I'm software engineer & developer evangelist at [Clarifai](http://clarifai.com), and I've been teaching myself HTML, CSS, and other web programming and scripting for over 10 years. And I want to teach you now. Because you're good looking. And because it's useful. -###What +### What In this tutorial, we'll start from the very beginning. You don't need to know anything about HTML and CSS or anything about code to start. I'll include some tutorial files for you to play with and check out. -###When +### When Now. Or whenever. I'm not planning on taking this down anytime soon. But you are only limited by your own schedule. Or set free by it. Whatever. -###Where +### Where On a computer. Here. -###Why +### Why Because this stuff is important. Whether you're a business person formatting your emails, an aspiring web designer wanting to get your feet wet, or just someone who is interested and hasn't tried any sort of coding, scripting, or programming before, **HTML and CSS are an essential part** of your learning curve. -##Table of Contents +## Table of Contents * [HTML](https://github.com/cassidoo/HTML-CSS-Tutorial#html-time-lets-go) * Editors * Tag Structure @@ -65,9 +65,9 @@ Because this stuff is important. Whether you're a business person formatting yo * [Final Project!](https://github.com/cassidoo/HTML-CSS-Tutorial#final-project) * And now, the end is near -##HTML Time. Let's Go. +## HTML Time. Let's Go. -###Editors +### Editors So the first thing you'll need is an editor to edit your jazz. There's tons of options out there. @@ -79,7 +79,7 @@ So the first thing you'll need is an editor to edit your jazz. There's tons of There's a bunch of others [listed here](http://en.wikipedia.org/wiki/List_of_HTML_editors), I just listed the ones I've used and liked! -###HTML Tag Structure +### HTML Tag Structure Here is a barebones HTML page, about as simple as you can get. You can open it up in the **1 - Structure** folder in the file part1.html. If you were to open the file in your favorite browser (which you can do, go ahead), you'll see a plain webpage with the title "My Website" and the words, "Hello, World!" written on the page. @@ -118,7 +118,7 @@ Inside ``, there are two elements: `
`and ``. Contained in `` tags. `
` adds a *paragraph* of text to our website, whic And finally, we have `
` tags like I put above. You could put them in `
`, but you still want to break it up. That's easy. @@ -200,7 +200,7 @@ So, there's two special tags here, `
` tags to try it out! -####Tables +#### Tables Tables are really cool. They can also be a bit confusing. Open up tables.html (in the **2 - Tags** folder) in a browser to check out the example table I made for you there. There's several tags for tables, but the essential ones are `
| `, and ` | `. Look at tables.html in your editor. @@ -281,13 +281,13 @@ One other fun thing you can try playing with are the `colspan` and `rowspan` att You can also nest tables, but I won't get into that right now. If you want to play around with the code, try adding some ` |
|---|---|
| ` tags inside your current ` | ` tags. MaGiCal ThInGs.
-###Making Things Gorgeous The Wrong Way
+### Making Things Gorgeous The Wrong Way
So, your website right now looks pretty bland, and that's normal. But, we want a website that is hot, sexy, ravishing, and powerful. Yes, that's right, we want a website just like you.
So first, I will show you the wrong way to style your pages. You might ask why, but trust me, if you learn in this order, you'll understand HTML attributes a lot better, and then when you move on to CSS your mind will explode with joy. Explode.
-####Colors
+#### Colors
Alrighty. Let's get frisky. Open up the **3 - Styles** folder and the file style1.html. You might notice that this file is pretty bland right now, but that's what we're gonna fix. Be patient, my grasshopper.
@@ -314,7 +314,7 @@ Try adding colors to various tags on the page! You can make your `` the col Now, you might see the syntax in your HTML journey where you actually have the `color` attribute, like `wut `. Though this is technically allowed, please don't do this. Please. You'll be so much happier in the long run, I promise. -####Width and Height +#### Width and Height So, what if you want to make a picture or a paragraph a different size? Easy peasy. @@ -347,7 +347,7 @@ If you have more than one property that you want to style, for example both heig Why is the syntax this funky? Well, that's because it's secretly CSS syntax. But we'll get into that more later. -####Borders +#### Borders What if we have a paragraph IN A BOX. That's right. Kind of like a table. But not. That'd be cool. Of course, there are plenty of other things that can have a border. Buttons (we'll get to those later), color blocks (also later), and images, and MORE can have them. Mmmhm. @@ -379,7 +379,7 @@ Let's mix it up a bit with different borders for you to check out. I'm just goi Notice how I added `width` and `height` to a couple of them. We're getting incestuous with our stylings. Aww yeah. -####Text Styles +#### Text Styles Besides having header tags and colors, there are other text styles that you can use. What if you want bold text, or italics? Different sizes? Once again, the `style` attribute comes to the rescue. @@ -398,7 +398,7 @@ Browser time. You've now got some text in the font Arial, and it's italic! WOO The properties we used here are `font-family` and `font-style`. For the former, you can choose a lot of fonts, but you have to be careful. Not every computer has the same fonts. This is just my personal opinion: don't put something here besides Arial unless you've done some JavaScript magic. And because I'm assuming you don't know JavaScript, don't use this unless you're changing this to Arial. At least not yet. :) And for `font-style`, it can be `normal`, `oblique`, and `italic`. You can play with those now, it's pretty straightforward. -###The `` Tag +### The `` Tag Before we start going insane with how good you are at HTML, let's start looking at something that you haven't played with yet. The `` tag. @@ -436,13 +436,13 @@ Add this after your description line, and stick your name in it! I think I got And there you have it, a self-refreshing webpage. You're so good at this. -###Putting it all together so far +### Putting it all together so far Okay, you have a pretty solid understanding of stuff so far. I want you to take cooking.html, and make it shine. Resize the images so the page is more uniform. Add borders to them. Change the font styles and weights. Change the colors. Add some keywords in the metadata and change the title of the page. Using the information I've given you so far, you can make a pretty good looking site! -##CSS is magical, and now you're gonna learn it. +## CSS is magical, and now you're gonna learn it. So far, we've been making things pretty the wrong way. So, we're going to learn it the right way. So excited. @@ -508,11 +508,11 @@ You will always have your CSS in the syntax, `selector { property: value; proper Try playing around with the CSS we have right now. Edit the colors, add some borders, change the font styles. Don't forget your semicolons! -###Classes and IDs and other Segregation +### Classes and IDs and other Segregation So, you have some of the CSS basics down already. You're so smart. It's really a simple language, once you know the basic syntax. So, now we'll get into more fancy stuff. What if you want to edit several tags differently? -####Classes +#### Classes Let's say that we have 8 `` tags on our HTML page (hint: open style3.html in the **3 - Styles** folder).
If we want to style each of these tags differently, we can use *classes*. A class is actually an HTML attribute that you can name whatever you want.
@@ -551,7 +551,7 @@ Gosh you're good at this. Go eat a cookie.
[Pausing here for cookie break]
-####IDs
+#### IDs
Now, let's talk about IDs. They are very similar to classes. The only real difference between classes and IDs is that you can only have one of each ID. So, for example, if you have a special paragraph that you only want to style once, then you can stick in there the `id` attribute like so:
@@ -566,11 +566,11 @@ When you want to style your IDs, you put a hashtag `#` before it in your CSS, li
Remember: You can only use an ID once. IDs are more helpful when you're controlling the element with JavaScript, not styling, but that's something for another day.
-####Other Segregation
+#### Other Segregation
Let's say that you want to separate individual text in your paragraphs or sections on your page. Let's introduce 2 new tags: `` and ` |