CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   HTML & CSS Resources (http://www.codingforums.com/showthread.php?t=233345)

Apostropartheid 07-28-2011 04:00 PM

HTML & CSS Resources
 
HTML & CSS Resources

Contents
  1. Basic HTML & CSS Tutorials
  2. What DTD/DocType should I use?
  3. Testing in Browsers/X-UA-Compatible
  4. HTML & CSS Official Documentation and Validation
  5. How do I protect my source code?
  6. HTML & CSS FAQs

Apostropartheid 07-28-2011 04:01 PM

Basic HTML & CSS Tutorials

Bare essentials
  • Just starting out with HTML? Here are 10 essential HTML tags that you'll need to know when building your web pages. If you learn how these 10 tags work then you'll have enough knowledge to put together a basic page. http://www.elated.com/articles/first-10-html-tags/

How to Make a Web Page:

How to Make a Web Site:

Choosing Dimensions for Your Web Page Layout:

Web Editors (Many Free):

(full credit: MajorPayne)

Miscellaneous resources:

Apostropartheid 07-28-2011 04:01 PM

What DTD/DocType should I use?

There are currently four standards in use: HTML 4.01, XHTML 1.0, XHTML 1.1 and HTML5. All of these require a different DTD to tell the browser how to render the page.

If you want to use HTML 4.01 or XHTML 1.0, there are three "flavours" of DTD: Strict, Transitional and Frameset.

Strict DTDs should be used for all new documents. The browser will render everything in Standards Mode, the most reliable and up-to-date version. Transitional DTDs should be used only when transferring from old versions of HTML. This is highly unlikely, and should be avoided in most circumstances. It forces the browser to guess at what the code means, using a "quirks" mode which renders the document as though it were written over a decade ago. Frameset DTDs allow frame content; this is highly discouraged and should also be avoided.


For HTML 4.01:

Strict:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

Transitional:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

Frameset:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/html4/frameset.dtd">



For XHTML 1.0:

Strict:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Transitional:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Frameset:
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



For XHTML 1.1: XHTML 1.1 only has one DTD, but the document must be served as under the MIME types application/xhtml+xml or application/xml. If you do not know what this means, do not use it. Because of this requirement, XHTML 1.1 is not widely used. You may use this DTD:

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">



For HTML 5: HTML 5 is currently under development, but some elements have gained support in the most modern browsers. If you wish to use HTML5 and understand the major differences between that and the more-prevalent HTML 4.01, you may use this DTD:

Code:

<!DOCTYPE html>
Do not feel obliged to learn HTML5. HTML 4.01 will be around for a long, long time and is much more stable in terms of browser support.

Apostropartheid 07-28-2011 04:01 PM

Testing in Browsers and X-UA-Compatible

In order to ensure maximum compatibility, you should test in as many browsers as possible. Here are the most common ones of each rendering engine:

Trident
  • Internet Explorer 9. The rendering engines of Internet Explorer 7 and 8 are accessible using the Developer Tools (F12) without having to install a different version.
  • Virtual PC VHDs. These allow you to virtualise Windows 7, Vista or XP systems running IE6-9.

Gecko
WebKit
Presto
Layout engines of the same type will almost always render the same; it should not be necessary to test in every single version, apart from in Internet Explorer.

X-UA-Compatible

Internet Explorer can also be forced to always render in IE7 mode by using the X-UA-Compatible header. The easiest way to do this is by including it in a meta element in your document's head:

Code:

<meta http-equiv="X-UA-Compatible" content="IE=7">
This allows you to only test in two versions of Internet Explorer.

Apostropartheid 07-28-2011 04:01 PM

HTML & CSS Official Documentation and Validation

W3C validators

W3C specifications:

HTML
CSS

CSS 1:CSS 2:CSS 3:Other CSS Specifications:
Other CSS related documents from W3C:

Apostropartheid 07-28-2011 04:17 PM

How do I protect my source code?

You can't.

For more info, see our extensive thread on the matter.


All times are GMT +1. The time now is 04:00 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.