davidjrush.com

bloggerrific

A blog written about web design, CSS, and coding for beginners

Posts Tagged ‘web design classes’

HTML For Beginners

Saturday, February 6th, 2010

I’ve been inspired to write an explanation of how HTML works, and how webpages are created in general, so that the average person, computer-savvy or not, can understand, and even do their own work with HTML. But, I’m gonna start at the WAY beginning, so if you already sorta get it, then don’t start here.

So first, an explanation of what HTML is. HTML is what us web designers and developers use to tell a person’s internet browser how to make the webpage look. How about an analogy. Say you just painted a room in your house, and to do it, you took everything out of the room and put it in a pile. Now you need to put all the stuff back into the room, all in a specific place. Certain things need to look certain ways. Pictures need to be hung on the wall, furniture needs to be up against the wall, books need to be on shelves, and lamps need to be plugged in. Now think of the webpage as the room, and all the things you have to put in your room are the pictures and text and links you want in your webpage. All those different things have to look certain ways, and for a person’s browser to know where to put everything on the page, it needs HTML to explain it.

Let’s get a bit more specific. Every webpage you ever look at has HTML in it. The basis of HTML is something called a tag. The tag is what you put around different types of things on your webpage so the internet browser knows what to make it look like. There is a tag for paragraphs, for images, and for links, in fact there are about 100 different types of tags (Here’s a list of all HTML tags). Really, only about 20 are commonly used though, so don’t worry. All tags look something like this (but for the example, this is a paragraph tag):

<p>Your paragraph goes inside here.</p>

You’ll notice the paragraph tag opens, then you put in the paragraph, and then it closes with the slash you see above. You can also put tags inside of other tags. In fact, that is really the basis of all HTML pages. Say for example you wanted a link inside of your paragraph. You’ll obviously have a link tag inside your paragraph tag. That would look like this:

<p>Your paragraph goes inside here. And here is a <a href="www.google.com">link</a></p>

The a means a link, and href is where you put the destination of the link. Similarly, images are put into tags. Images have the img at the beginning for image, then the source (src) where the image is (if you copy and paste that url into your browser, you’ll visit a page with just the image), then the height and width of the image (in pixels), and then alternative text (alt) if the image doesn’t display.

<img src="http://www.davidjrush.com/images/main/web.jpg"
height="100" width="200" alt="davidjrush website design" />

Now you’ll notice that there is no closing tag for the img tag, because nothing goes "inside" of it. So, it closes itself at the end with a slash.

Some other common tags you’ll see, and what they mean:

<html></html> - The entire HTML page is wrapped inside an html tag
<head></head> - Things like the title and description of the page go in the head tag
<body></body> - The body tag contains all the displayed HTML
<table><tr><td></td></tr></table> - This is a table like in Microsoft Excel.
First you open the table, then you have as many rows as you want (tr)
with as many columns as you want in each row (td).
<ul><li></li></ul> - This is an unordered list (ul) with lots of list items in it (li).
Unordered lists have bullets. Ordered lists (ol) have numbers.
<h1></h1> - This is a header tag. Titles and bigger text go in here.
There are 6 header tags that display smaller as you increase the number (h2, h3, h4, h5, and h6).
<div></div> - Think of the div tag as a two-dimensional box.
You can put stuff in it, tell it how big to be, and tell it where to show up on the webpage.
This is probably the most common HTML tag, and also the hardest one to understand.

Alright, that’s enough of those for now, because those are the major ones. Browsers have default ways of displaying those tags. Then, what web designers do, is they apply special rules to those tags so they display just how they want them to. That’s what makes different websites look so different! Those special styles are included in different files called CSS files, or Cascading Style Sheets. I’ve written many posts on CSS, here’s the CSS Back To Basics post. Any questions, feel free to ask! And if you are ever curious how a webpage is written, you can go to your browser, click the view menu, and select to view the source. That will let you see all the HTML that makes the page you are viewing! Don’t get overwhelmed though, just give it a shot and take your time.

HTML – Getting Started

Tuesday, December 2nd, 2008

So, just getting into the game huh? Well let me leave the scolding for later. Let’s pretend that your mother’s dog doesn’t have its own blog and personal myspace page. Let’s pretend that your grandpa didn’t make a facebook account last week. Let’s pretend that every small business out there hasn’t realized that having a website is always an improvement over the yellow pages… Oh wait, they haven’t gotten to that point yet…

At least you’ve caught on. Getting into web design is no easy task, but it isn’t all that difficult either. I am about 98% self taught in everything I know about web design and coding. So here are a few tricks you can use that will help you learn:

1. The best way to learn is by doing. Try making your own site. Open up a good old text file, and start writing. If you save the text file as .html instead of .txt, then any web browser will read it (assuming you wrote it correctly)!

2. Imitation is the sincerest form of flattery. If you see something you like on another website, then be inquisitive! See how they did it. If you go to your browser’s menu screen, click on View, and then View Source. This is the code that the browser reads to display the website.

3. Use the resources that have been provided to you. There are tons of great websites out there that can help you. What are you struggling with? Code? Try w3schools, the place that helped me learn most of what I know. They have a tutorial for every web language you could imagine. Start with HTML and CSS. Difficulty with design? Find other sites that you like the look of. There is a great directory of web 2.0 sites that you can try out. Also try the CSS Zen Garden which shows the power of CSS or CSS Beauty which shows… the beauty of CSS. There is a ton out there, just google it!

4. I guess you could take a class, but that didn’t do crap for me.

5. When in doubt, Google it! If there is ever anything I’m not sure how to do, or something that is broken that I can’t seem to fix, I Google it. Someone has written about it somewhere. You can always try asking someone that does it for a living… cough cough… and hopefully they might have the answer!

6. Get the greatest tool EVER! If you don’t have firefox as your default browser, fix that problem first. Then, download the add on entitled “Web Developer”. It has the best tools for web developers including tools to outline your divs and tables, resizing your window, viewing source, and even editing the CSS for other people’s websites! That’s right, you can edit the CSS for facebook or google or cnn. I know right?!

7. Still not sure how to get started? Well stay tuned, I’ll be writing more about HTML and CSS basics. I will interject with other topics like special CSS tricks as well, so you’ll have to bare with me…

Thanks for reading. Questions? Just ask!

Bloggerrific powered by WordPress | minimalism by www.genaehr.com | edited by David J Rush | Entries (RSS) and Comments (RSS).