Should I teach CSS layout directly to new learners

2019-06-26 08:08发布

Should I teach CSS layout directly to new learners or should I first teach how to make layout with tables, then div+CSS?

And what should I teach between HTML or XHTML? Both are same so should I start directly with XHTML 1.0 Strict?

标签: xhtml css
10条回答
Luminary・发光体
2楼-- · 2019-06-26 08:41

You should teach them to use CSS for layout and tables for tabular data. They will figure out that they can (mis)use tables for layout all by themselves.

查看更多
成全新的幸福
3楼-- · 2019-06-26 08:42

Iam teaching some people html design in our company. The best way till now was to start with clean xhtml 1.0, than add some styles with css, than start to add divs with floating and such things.

Later show them how easy it is to create an 3 column layout with one of the popluar css frameworks like Bluetrip oder grid960.gs. I think there is NO reasons to teach design with tables (only if you use css3 and the new table styles).

查看更多
Deceive 欺骗
4楼-- · 2019-06-26 08:45

HTML or XHTML?

HTML and XHTML are the same language (i.e. the same tags, with the same meaning), just with slightly different syntaxes. If you know HTML, you know XHTML. In terms of learning, there’s no appreciable difference between them.

The difference between HTML 4 and HTML5 is greater than the difference between HTML 4 and XHTML 1.

查看更多
可以哭但决不认输i
5楼-- · 2019-06-26 08:46

Don't teach them tables!!

And teach them xHtml, it is more structured and they will understand the syntax better.

查看更多
看我几分像从前
6楼-- · 2019-06-26 08:53

If you start it wrong, don't expect it to be naturally fixed later (with the level of careless laziness we deal with in the web industry).

How about first you teach them accessibility and how a table in the layout will asplode any screen reader, then you don't have to justify why tables would be easier.

查看更多
Anthone
7楼-- · 2019-06-26 08:56

i'll speak from a perspective of a really inexperienced person when it comes to layout design...

so, in old days it was all html tables and although at times cumbersome to get what you want, but at least it was logical.

then i read all about the 'correct way of doing things' ie how css can save the world. and got lost, may be it's me, but getting something trivial done always takes lots of fiddling with css and really a huge amount of guesswork and trial and error. now i must admit i haven't spent lot of time figuring out css, but it seems a lot less intuitive than table layout.

so. i would suggest you start with css layout and i trust your students can get it right. when they are comfortable with that, introduce table layout. if you do other way round you will confuse them (or at least i'm confused and still trying to apply same patterns to css, which obviously doesn't work)

查看更多
登录 后发表回答