XHTML — Getting started

By request from my lit­tle­brother I will try and write some arti­cles about how to get started with XHTML and CSS. Please feel free to crit­i­cise and I will try to improve as I go along.

XHTML stands for Exten­si­ble Hyper­Text Markup Lan­guage and is often ref­ered to as just HTML. Its a markup lan­guage devel­oped by W3C and is used to tag con­tent on a web­site in order to struc­ture it. XHTML is not a kind of code as many think but is used strictly to mark con­tent with so called “tags”. A tag is a attribute that sur­rounds an ele­ment. Always remem­ber to close your tags. A close tag looks exactly like the start except for an “/” placed after the first “<”. For exam­ple: open­ing tag  <a> and close tag </a>.

Lets look at an empty XHTML-document


Empty xhtml doc

The Doc­type.

This declares what kind of doc­u­ment it is. In this case we have an “XHTML 1.0 tran­si­tional”. XHTML 1.0 is the cur­rent stan­dard on the webb but if you want to be cut edge you should check out the new XHTML 5.0 which can come to replace the stan­dard. “tran­si­tional” is one of two pos­si­bil­i­ties the other one being “strict”. The dif­fer­ence between these is that tran­si­tional isn’t as picky about how you struc­ture your code. If you’re not look­ing to show off bet­ter stick with transitional.

The <html> –tag

This tag should always be in the begin­ning and the end of the html-doc. This is the tag that declares that we’re in an html-document and the browser should treat the code inside as such.

The <head> –tag

this tag con­tains every­thing in your html-doc that doesnt show in the browser. Here you put links to javascripts, CSS etc. This is also where you place meta-tags which we will talk about later. The <title> that you see in the image is what will turn up at the top of the browser next to the browser-logo. Change “unti­tled doc­u­ment” to what­ever you want it to say.

The <body> –tag

Inside the body tag you place every­thing you want the vis­i­tor to see. this is where all your con­tent will be placed.

(our html with a lit­tle con­tent in it)

Now we know what all the basic tags mean. How do you put con­tent in your html?

More tags and content


There are alot of dif­fer­ent tags to use in html, lets begin with the sim­pler ones.

The <p> –tag

this tag is used to con­tain larger amounts of text. the p stands for para­graph and that itself says what it does. As you can see in the image above I’ve put some text inside an <p> tag and ended with </p>.

The <h1> –tag

This is a tag for Head­lines. If you’ve worked in Microsoft Word you know that there are dif­fer­ent kinds of head­lines. The same goes for html. We have h1, h2, h3, h4 and h5. This way you can struc­ture your con­tent with sub­head­lines just as you would in Word. In my image above I’m using the <h1> –tag to sur­round my name and ended it with the </h1> tag.

the <img> –tag

this is used to insert images in your web­page. a typ­i­cal <img/> tag con­tains a set of inner attrib­utes. Here’s an exam­ple: <img src=“images/test.png” alt=“test” />. The <img/> tag is one of few that is ended within itself. It’s because its not sup­posed to wrap around any other con­tent but con­tains the con­tent in itself. the “src” means source and is the URL to where your image is stored, the “alt” means alter­na­tive and is a text that shows instead of the image if it cant be loaded. If you dont want a text  show­ing just leave the quo­ta­tion marks empty.

Lets try and cre­ate a sim­ple XHTML page.


Start by cre­at­ing a new folder, name it what­ever you like. Inside it cre­ate a new txt-document and name it “mysite”.

Now paste this into the txt:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8″ />
<title>Untitled document</title>
</head>

<body>
</body>
</html>

Now play around with the dif­fer­ent headline-tags and the p tag. If you want to place images, cre­ate a folder next to the txt, place your image inside the folder and link the image as I shown in the exam­ple. If you named your folder “images” then your URL will be src=“images/nameofimage.png” just change the name of the image and the file-ending depend­ing on if your image is a PNG or JPG.

After you’re sat­is­fied and you’ve made sure you’ve closed all tags prop­erly try drag­gin your txt into your browser. If you’ve done it cor­rectly your txt should appear as a bunch of text and images with dif­fer­ent spac­ing and size (depend­ing on what head­lines you’ve used).

To be continued..

  • Twitter
  • Facebook
  • Digg
  • StumbleUpon
  • del.icio.us

Redesign #1

As you can see I’ve redesigned my blog. I think this is a much more set­tle design which fits my port­fo­lios design as a com­ple­ment rather than cheap ripoff! There’s still some issues to work out about the Nav­i­ga­tion but other than that I’m pretty sat­is­fied! This ver­sion has a lot less images which makes it faster to load. I should’ve made all images be part of one big sprite but they’re so few I’m too lazy to make the tiny difference!

  • Twitter
  • Facebook
  • Digg
  • StumbleUpon
  • del.icio.us

Why I love being a web designer

I’ve been doing web design related stuff on and off for about a year now and I find myself get­ting increas­ingly sucked in by the nature of it. Nowa­days basi­cally not one day goes by with­out me touch­ing some­thing in pho­to­shop, read­ing a bunch of RSS or even slap on some code to the world wide web. I read an arti­cle a few days back writ­ten by Andrew Houle about the five rea­sons to why he loves being a web designer. This got me think­ing about my own rea­sons for my rel­a­tively new crush for this pro­fes­sion. Some of them are sim­i­lar to the ones he’s talk­ing about (I mean, they’re kind of gen­eral ben­e­fits) and some I’ve come to real­ize myself.

The imme­di­ate vision


I find myself talk­ing to a poten­tial client, or maybe just a friend, about a sub­ject and I almost imme­di­ately have an epiphany about how that site would look like. This is some­thing fairly pecu­liar because the more intensely I try to vision it and add detail the more of it drifts from my mind and other ele­ments pop up instead. This process that occurs is to me fas­ci­nat­ing and I only have one word for you, sketch­book! I have to admit up until recently I’ve not been a fre­quent user of the paper way of things but I’ve come around and rec­om­mend it!

the help­ful­ness of others


Say what you want but I’ve never expe­ri­enced the web designer com­mu­nity as any­thing else than help­ful and kind. Of course we all are a bit dam­aged and maybe not entirely sane but we’re always there to help each other with con­struc­tive crit­i­cism and idéas on how to improve ourselves.

The con­stant changes


Every­thing is evolv­ing. The soft­ware gets improved, new tech­niques are invented, the web stan­dard is con­stantly improv­ing. To be a web designer is truly to never stop learn­ing. As soon as you stop mak­ing progress or stop read­ing up on the lat­est trends you’re out. This is one of the main rea­sons to why I love it because I am never fin­ished! There’s always some­thing new to dis­cover and this keeps me alert.

The struc­ture of the code


To look at a sites code (or my own for that mat­ter) and find the struc­ture of the code pleas­ing. When you see the logic behind a nice piece of code it become so easy to under­stand in com­par­i­son to a messy one. So just to know that I don’t only have to cre­ate the web­site, make it func­tional and look good I also have to (or atleast should try to) make the code as sim­ple, effec­tive and log­i­cal as pos­si­ble. Another chal­lenge for the mind and another thing I love!

The domino effect


The amount of web­sites out there is enor­mous and yet there always seem to be peo­ple in need of more. And the beauty of hav­ing a client that is sat­is­fied is that he or she will tell oth­ers about this and then sud­denly they real­ize that they’re in need of my ser­vices as well. So keep a good rela­tion­ship with the client and hope­fully they will have friends or col­leagues who will want to hire you too!

Easy access


All I need to do my work is my com­puter, maybe a sketch block and loads of cre­ativ­ity. This means that I’m able to do my work from almost any­where with internet-access and hope­fully elec­tric­ity. This pos­si­bil­ity and free­dom is quite an won­der­ful thing which I don’t think many make much use of. But come one.. how awe­some is it to design a web­site while sit­ting out­side in the sun with an ice-cool beer!

If you have your own rea­sons, please post them and share with me!

  • Twitter
  • Facebook
  • Digg
  • StumbleUpon
  • del.icio.us

Great interviews for students to read.

A few days ago smashingmagazine.com posted an arti­cle with an inter­view star­ring a cou­ple of suc­cess­full web­de­sign­ers. The arti­cle is aim­ing towards stu­dents and new­com­ers in web­de­sign and answers a few ques­tions we all might have in mind (I know I do). I found it to be really inter­est­ing and I think all of us should read it.

Here’s a quote from the interview:

David Leggett answers the ques­tion How does a stu­dent deter­mine whether design is for them or they should pur­sue another career?:

Every­one has a unique sit­u­a­tion, and I don’t mean to sug­gest the fol­low­ing is always true: if you’re already a stu­dent at a uni­ver­sity and have no out­side expe­ri­ence, it may be dif­fi­cult to really pur­sue a career in design. I say this only because per­sonal friends of mine have strug­gled to find jobs in this cur­rent eco­nomic cli­mate. Expe­ri­ence and some­thing to show for your knowl­edge goes a long way.

Oth­er­wise, be sure you truly enjoy what­ever you decide to pur­sue. Many design­ers and artists I’ve met thor­oughly enjoy their lifestyles, even when they’re strug­gling to find work. This is not to say that you should under­value your work, but if you can enjoy your career when you’re not mak­ing money, then it’s prob­a­bly a good match for you.”´

Link to arti­cle here

  • Twitter
  • Facebook
  • Digg
  • StumbleUpon
  • del.icio.us