U.S. CitiesCity-Data Forum Index
Go Back   City-Data Forum > General Forums > Science and Technology > Internet
 [Register]
Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
View detailed profile (Advanced) or search
site with Google Custom Search

Search Forums  (Advanced)
Reply Start New Thread
 
Old 07-07-2011, 06:36 PM
 
105 posts, read 507,853 times
Reputation: 132

Advertisements

I don't know if this is a good forum to post this question...please direct me otherwise, if appropriate?

I've been designing webpages for my own business for 16+ years, but the source code is "circa 1987," I've been told. I need to update my skills and my question about that, is this: what is the distinction between or relationship between CSS and html4?

I just got a book on html4; I think it's useful to design pages which will work fine on all sorts of different machines: Ipods, Smartphones, etc. But CSS is what I've been directed to, in the past, and I haven't had time to address it.

Your input appreciated.
Reply With Quote Quick reply to this message

 
Old 07-08-2011, 12:57 PM
 
8,266 posts, read 10,839,204 times
Reputation: 4774
1. You want to learn HTML5
2. HTML is content, CSS is style


this is HTML, it shows the word hello

<div class="mystyle">
hello
</div>


this is CSS, it makes the above hello pretty:

.mystyle {color:red; background-color: #FFFFD1; border: 1px solid #009900}


you could have another style sheet that does something totally different to the same content:

.mystyle {font-size:150%; float: left; background: url(/somepic.jpg)}



HTML5 is all the rage and is actually gaining support in browsers faster than I'd thought. It adds a lot of handly elements for things like input validation, local data storage, video/music, even has a legit canvas element that can be painted into. Learn that.
Reply With Quote Quick reply to this message
 
Old 07-08-2011, 05:42 PM
 
40,182 posts, read 41,790,512 times
Reputation: 16740
HTML=markup or the structure of the document.

CSS=Formatting or how it's presented visually like colors, text sizes, positioning etc.

To elaborate on what slackjaw posted you can separate the two which eliminates a lot of maintenance issues.

For example using mid 90's formatting you might see something like this in the source code:

Quote:
<p><font size="3" color="red">Hello World! </font></p>
Not only is it hard to read but if you want to change it across multiple documents you need to hunt it down in every document.


As slackjaw pointed out with CSS we can apply a class:

Quote:
<p class="someclass">Hello World!</p>
At the top of every HTML document you'll link to the stylesheet inside the head tags:

Quote:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
All of your formatting can be contained in this one document mystyle.css. When you edit the class in this one document it effects every instance where the class was used in all your HTML files.
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 10:56 AM
 
2,182 posts, read 4,706,159 times
Reputation: 1206
Is HTML5 hard to learn, if you know some HTML? I build little 3-4 pages sites using HTML with DIV boxes and CSS to sprinkle on the flavor. Would it be a somewhat easy transition to make? For compatibility reasons, if someone's browser doesn't support HTML5, will they get a super ugly mess, or will just some features not work?
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 01:03 PM
 
40,182 posts, read 41,790,512 times
Reputation: 16740
Shouldn't be hard at all if you know HTML, it just introduces some more standards and features.

Quote:
if someone's browser doesn't support HTML5, will they get a super ugly mess, or will just some features not work?
I really don't know 100% but I believe most browsers that do not recognize the doctype are going to revert to quirks mode which will make a mess of things. Of course any tags or features in exclusive to HTML5 will not work at all.

There will be a shift at some point and HTML5 will become the norm, those with older browsers will have no choice but to upgrade.
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 01:14 PM
 
24,503 posts, read 35,961,779 times
Reputation: 12847
HTML5 is easy if you have general knowledge of html, css and js already.

HTML5 can be a big mess in unsupported browsers if you don't plan for it. And planning for it is just as simple as making your website look identical in all versions of IE.
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 02:48 PM
 
2,182 posts, read 4,706,159 times
Reputation: 1206
I have a hard time with that now, and that's with very basic JQuery, divs and CSS.....damn you IE6! DAMN YOU!
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 03:21 PM
 
40,182 posts, read 41,790,512 times
Reputation: 16740
I stopped worrying about IE 6 a year ago, at most I might fix something if it makes the site completely unusable.
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 04:10 PM
 
2,182 posts, read 4,706,159 times
Reputation: 1206
Quote:
Originally Posted by thecoalman View Post
I stopped worrying about IE 6 a year ago, at most I might fix something if it makes the site completely unusable.
On my current site, I have already told them that we're not going to be supporting IE6 or 7, and she was OK with that.
Reply With Quote Quick reply to this message
 
Old 07-12-2011, 05:43 PM
 
24,503 posts, read 35,961,779 times
Reputation: 12847
Quote:
Originally Posted by kazyn View Post
I have a hard time with that now, and that's with very basic JQuery, divs and CSS.....damn you IE6! DAMN YOU!
Yea, that was my point. I was typing from my phone, so I didn't do a good job with sarcasm. Making HTML5 break good in non compliant browsers is a pain.
Reply With Quote Quick reply to this message
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.

Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.


Reply
Please update this thread with any new information or opinions. This open thread is still read by thousands of people, so we encourage all additional points of view.

Quick Reply
Message:

Over $104,000 in prizes was already given out to active posters on our forum and additional giveaways are planned!

Go Back   City-Data Forum > General Forums > Science and Technology > Internet
Follow City-Data.com founder on our Forum or

All times are GMT -6. The time now is 06:49 AM.

© 2005-2019, Advameg, Inc. · Please obey Forum Rules · Terms of Use and Privacy Policy · Bug Bounty

City-Data.com - Archive 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 - Top