/    Sign up×
Community /Pin to ProfileBookmark

Doctype Question

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

After i added this doctype it screwed up a table on my web page, and it seems like no matter what i change, nothing happens on the page. Does this one not accept css?? CSS doesnt do anything nor does changing things like height=”#px”..

so what all does this do?

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 27.2010 — Without seeing your document we can't see the problem.

Using a valid DTD to put the document in standards mode will produce more consistent rendered html across browsers.
Copy linkTweet thisAlerts:
@tracknutSep 27.2010 — ... nor does changing things like height="#px"..[/QUOTE]

We do need to see the site, but just here there's an issue (if I've interpreted your pseudo-code right) right here already. The syntax where you'd use "height=" is height="200" not height="200px"

Dave
Copy linkTweet thisAlerts:
@Major_PayneSep 27.2010 — A XHTML 1.0 doctype and tables are NOT a happy combo. Many of the attributes you are use to using for tables will have to be removed and place on a CSS file. You just do not have the syntax correct for that doctype. The validator will tell you every instance of your problem as you go line by line with the corrections.

Better if you were to drop tables and use divs with CSS, but a table with CSS is better than nothing.

Tableless Web Design: http://en.wikipedia.org/wiki/Tableless_web_design

Why tables for layout is stupid: http://www.hotdesign.com/seybold/

How to convert manually your HTML tables to CSS: http://www.table2css.com/articles/convert-your-html-tables-to-css

Images, Tables, and Mysterious Gaps: https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps
Copy linkTweet thisAlerts:
@KorSep 27.2010 — If you don't handle XML files within your site, there is no notable gain to use an XHTML Doctype. A strict HTML DTD should be enough.

On the other hand, if your document looks screwed under a certain Doctype (no matter which), that means [I]your[/I] code is not correct. It is not the Doctype's fault ?
×

Success!

Help @ZZY spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...