Jump to content

How to write HTML & CSS in a professional manner?


Recommended Posts

In a follow up to my post on how to code PHP in a professional manner (http://www.phpfreaks.com/forums/index.php/topic,291398.0.html), I decided to start this one :P

 

Background:

Have been coding for a number of years, but nothing that was accessible to a large amount of people, so my HTML & CSS was randomly thrown together (I think 90% of it was divs with floats and clears lol) and tweaked until it sort of worked in Firefox and IE.

 

I don't want to be an HTML & CSS expert (in any case I'm not very artistic) but I want to be able to make correct, professional looking sites to go with my PHP code. Since I really enjoyed the nettuts tutorials on CodeIgniter, I looked through their website and came across this tutorial:

http://net.tutsplus.com/tutorials/html-css-techniques/html-5-and-css-3-the-techniques-youll-soon-be-using/

 

It seems like a great intro to good markup practices.

 

My questions:

- Are the HTML5 tags supported by most browsers?

- Is this tutorial sufficient as an intro to HTML & CSS?

- Do you guys know of any great CSS tutorials which go somewhat past the basics?

 

Any other tips, etc. would be appreciated.

 

Thanks!

Currently you shouldn't be using HTML5 tags in any of your webpages. These are not supported by most browsers. You should use HTML4 standards. Of course w3schools.com has a decent tutorial for that as it is the official international standard for HTML. I don't know any really good tutorials for either HTML or CSS though as i am self taught in the 2.

Try looking at some high quality templates or professionally designed websites for good practice. You should always try to code in XHTML Strict 1.0 where possible. CSS should be used for all design of your webpage.

Of course w3schools.com has a decent tutorial for that as it is the official international standard for HTML.

 

w3schools.com has NOTHING at all to do with defining any web standards, it is a tutorial site like any other.

i mean w3c

well, html5 is supported by google chrome, safari, and IE with a google chrome frame. At least that is with the h.264-videocodec. This is because browsersmakers have to pay to use this technology, and mozilla simply doesn't have the money for it, and it's not really necessary eather. Though I do believe in the future, everything will become html5, more than flash.

Though I do believe in the future, everything will become html5, more than flash.

 

1. No doubt it will become HTML 5 that's called progress

2. Flash is dead, Apple killed it! Bastards!

 

You should always try to code in XHTML Strict 1.0 where possible.

 

Only if you are just starting out with HTML programming otherwise you should use HTML 4. IE 8 for example does not support XHTML as it renders it as HTML

 

Many mistake to write XHTML while declaring Content-Type: text/html which should be according to W3C application/xhtml+xml. If you use PHP you should set the default_mimetype directive to application/xhtml+xml as it overwrites your HTML declared Content-Type

well, html5 is supported by google chrome, safari, and IE with a google chrome frame... mozilla simply doesn't have the money for it

 

Firefox 3.6 has HTML5 support.

Though I do believe in the future, everything will become html5, more than flash.

 

1. No doubt it will become HTML 5 that's called progress

2. Flash is dead, Apple killed it! Bastards!

 

You should always try to code in XHTML Strict 1.0 where possible.

 

Only if you are just starting out with HTML programming otherwise you should use HTML 4. IE 8 for example does not support XHTML as it renders it as HTML

 

There is no should about it. It's purely a matter of decision. It's true that XHTML is not served as XHTML when using a text/html mimetype, but that doesn't make it wrong, it just doesn't give you any of the benefits you would get if you served it with an XHTML doctype.

 

There is a long running discussion going on the matter in this thread.

One tip is very important while using CSS is that :  All the css coding should be written in a separate external .css file and it should be linked in .html document. It helps to make the HTML document clean and light and also helps to edit the document formatting easily in one go just by editing a single file!

One tip is very important while using CSS is that :  All the css coding should be written in a separate external .css file and it should be linked in .html document. It helps to make the HTML document clean and light and also helps to edit the document formatting easily in one go just by editing a single file!

 

Not to mention you only need to change one line if you ever want to switch stylesheets

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.