Newbie wants advice on writing correct HTML

E

Ed

It's many, many years since I wrote anything in HTML, so in effect I am
a totally new user who wants to write and publish a small website for
family/friends to use. It is not really intended for general public
consumption.

I have sketched out on paper a plan of the content of the website and
the links between the various pages. But what tools should I use to
write the necessary code?

I had intended to just use HTML 4.0 with some javascript to plug some
gaps. But then I read on this site that frames are best avoided - and I
was going to use them extensively in my website! Iframes don't seem to
be thought of as a really good alternative. The use of tables too seems
to come in for some criticism unless they are used for absolutely pure
data reasons. And the use of javascript seems to only get a lukewarm
reception. And even some familiar tags like <center></center> are
outdated I think?

I'd like to start coding up to a good standard. Further reading here,
seems to suggest that I could produce a good basic website, usable
within Firefox and IE, by coding in XHTML along with CSS and some
javascript where necessary. I'm not familiar (too old I guess) with
other things like SSI, CGI, ASP, DHTML/Layers, XML etc..

I would like to try to adhere to correct standards from the off and
would welcome any comments as to if XHTML and CSS are the best tools to
begin with? And is there a definitive site which describes these?


Ed
 
N

Neal

It's many, many years since I wrote anything in HTML, so in effect I am
a totally new user who wants to write and publish a small website for
family/friends to use. It is not really intended for general public
consumption.

Still, it's best to do it from a standards-base. Who knows what the
eventual IE release will do with code? Who knows what new nifty browser
will be the most common one 5 years from now?
I have sketched out on paper a plan of the content of the website and
the links between the various pages. But what tools should I use to
write the necessary code?

I had intended to just use HTML 4.0 with some javascript to plug some
gaps. But then I read on this site that frames are best avoided - and I
was going to use them extensively in my website! Iframes don't seem to
be thought of as a really good alternative. The use of tables too seems
to come in for some criticism unless they are used for absolutely pure
data reasons. And the use of javascript seems to only get a lukewarm
reception. And even some familiar tags like <center></center> are
outdated I think?

Mmm-hmm. I pretty much agree with what you've described above.

I write a bare-bones no-nonsense plain vanilla HTML 4.01 Strict page
first. Main tools are fingers and Crimson Editor (a great multi-purpose
text editor). I use the HTML totally semantically (all headings are hx
elements, etc.). If there's a place where I might use a pic, I either use
text in its place if appropriate, or I leave it alone. Finally I have a
totaly unstyled HTML Strict page which works for anyone.

Then I add images - if there's text I've used in its place, that text
becomes an alt value, if no text then alt="". All color, style, etc. are
added in CSS. Finally, I add div elements to the markup as is sensible and
position the page elements in the CSS.

Lastly, any Javascript effects are added, but the page has to work without
them. (Probably 85% of what used to be done in Javascript can be done in a
better way or is best not done IMO.) If I have PHP available on the server
some things are done in that.

Now, frames are bad, but you can still have a section appear on every page
using simple PHP. Here's what I do.

1) As above, design the page, get the positioning done, etc.

2) Cut the stuff from the HTML code which will appear on every page.
Replace that with a PHP rewuire or include statement and save the document
as a .php file.

3) Create a txt file and paste that code in it, named to match the URL in
the include.
I'd like to start coding up to a good standard. Further reading here,
seems to suggest that I could produce a good basic website, usable
within Firefox and IE, by coding in XHTML along with CSS and some
javascript where necessary. I'm not familiar (too old I guess) with
other things like SSI, CGI, ASP, DHTML/Layers, XML etc..

I would like to try to adhere to correct standards from the off and
would welcome any comments as to if XHTML and CSS are the best tools to
begin with? And is there a definitive site which describes these?

XHTML - time has not come IMO. Time may never come. IE won't deal with it
unless we serve it the same as HTML, so no benefit found.

That said, if you can ignore everything pertinent to XHTML and replace it
mentally with HTML, http://www.htmldog.com is a great site for you. I
really don't think the XHTML emphasis there is appropriate, but the CSS,
non-XHTML-specific HTML advice, and the general approach to web authoring
is right on the money.

http://www.w3schools.com gets suggested a lot too. I think it's good, but
a little too fast with content for a tutorial.
 
S

SpaceGirl

Neal said:
Still, it's best to do it from a standards-base. Who knows what the
eventual IE release will do with code? Who knows what new nifty browser
will be the most common one 5 years from now?



Mmm-hmm. I pretty much agree with what you've described above.

I write a bare-bones no-nonsense plain vanilla HTML 4.01 Strict page
first. Main tools are fingers and Crimson Editor (a great multi-purpose
text editor). I use the HTML totally semantically (all headings are hx
elements, etc.). If there's a place where I might use a pic, I either
use text in its place if appropriate, or I leave it alone. Finally I
have a totaly unstyled HTML Strict page which works for anyone.

Then I add images - if there's text I've used in its place, that text
becomes an alt value, if no text then alt="". All color, style, etc. are
added in CSS. Finally, I add div elements to the markup as is sensible
and position the page elements in the CSS.

Lastly, any Javascript effects are added, but the page has to work
without them. (Probably 85% of what used to be done in Javascript can be
done in a better way or is best not done IMO.) If I have PHP available
on the server some things are done in that.

Now, frames are bad, but you can still have a section appear on every
page using simple PHP. Here's what I do.

1) As above, design the page, get the positioning done, etc.

2) Cut the stuff from the HTML code which will appear on every page.
Replace that with a PHP rewuire or include statement and save the
document as a .php file.

3) Create a txt file and paste that code in it, named to match the URL
in the include.



XHTML - time has not come IMO. Time may never come. IE won't deal with
it unless we serve it the same as HTML, so no benefit found.

That said, if you can ignore everything pertinent to XHTML and replace
it mentally with HTML, http://www.htmldog.com is a great site for you. I
really don't think the XHTML emphasis there is appropriate, but the CSS,
non-XHTML-specific HTML advice, and the general approach to web
authoring is right on the money.

http://www.w3schools.com gets suggested a lot too. I think it's good,
but a little too fast with content for a tutorial.

I disagree. Now is THE time to write XHTML. Dont wait until you HAVE to
write it or it'll be panic-panic. Now is a good time to get into it,
learn the structure and the "whys" and "hows". Simple pages will still
work perfectly in older browsers, and you wont have to unlearn stuff
when you do decide to move to XHTML later on.

XHTML transitional is the place to start if you are a newbie. HTML4.01
is long dead.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
B

Beauregard T. Shagnasty

SpaceGirl said:
XHTML transitional is the place to start if you are a newbie.
HTML4.01 is long dead.

<waves hand/>

New documents should be Strict, not Transitional, whether they be
XHTML or HTML.
 
S

SpaceGirl

Beauregard said:
<waves hand/>

New documents should be Strict, not Transitional, whether they be XHTML
or HTML.

Okay, good point. But XHTML strict is VERY unforgiving, and IE hates it.
Transitional is an easier learning curve.


--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
N

Neal

I disagree. Now is THE time to write XHTML. Dont wait until you HAVE to
write it or it'll be panic-panic. Now is a good time to get into it,
learn the structure and the "whys" and "hows". Simple pages will still
work perfectly in older browsers, and you wont have to unlearn stuff
when you do decide to move to XHTML later on.

XHTML transitional is the place to start if you are a newbie. HTML4.01
is long dead.

I'll race you. You turn your XHTML transitional document into XHTML 1.1,
and I'll turn my HTML 4.01 Strict document into XHTML 1.1.

Point: when I "need" it - and I doubt I ever will, but for the sake of
argument - it'll take me no time at all to translate the files.
 
B

Beauregard T. Shagnasty

SpaceGirl said:
Okay, good point. But XHTML strict is VERY unforgiving,

...for some value of unforgiving. Personally, I don't think there is
much difference at all between HTML and XHTML Strict.
and IE hates it.

Only if you serve it as application/xhtml+xml. If you cheat and use
text/html, IE will/should work (though I'm not recommending it).

http://www.hixie.ch/advocacy/xhtml
Transitional is an easier learning curve.

Why start by learning old stuff? Transitional could be used when
quickly converting legacy documents.
 
B

Barbara de Zoete

It's many, many years since I wrote anything in HTML, so in effect I am a
totally new user who wants to write and publish a small website for
family/friends to use. It is not really intended for general public
consumption.

That doesn't really matter, as it will be available to the general public if
you publish on the www.
I have sketched out on paper a plan of the content of the website and the
links between the various pages. But what tools should I use to write the
necessary code?

You can try to code by hand and use a editor that colors markup tags for
example. For coding html I use Textpad available at <http://www.textpad.com/>
and for CSS I use TopStyle Lite available at
<http://www.bradsoft.com/download/index.asp>.
If accessiblity and usablitily is no issue at all for you (you really intend
all of the content to be displayed and available only to people you know,
_AND_ you don't care for possible other visitors) you might want to try a
WYSI(n)WYG editor. But only than.


[on frames]

Frames are generally not such a very good idea, because it is hard to code
them correctly. That is to code them such that a visitor without frames
capability still gets to the content s/he wants to. Read some on this frames
discussion by looking at
<http://www.google.com/search?q= your+browser+doesn't+support +frames>.

[on center, HTML and CSS]

Since you haven't done any html for some substential time, you best read up on
what is currently available for HTML4.01 at <http://www.w3.org/MarkUp/Guide/>
and <http://www.w3.org/TR/html401/>. Don't let the amount of information scare
you off.

Writing with html isn't at all hard. Think 'semantic markup'. As you write
your content think what it is (not what it should look like). Find the correct
element in the specifications and recommandations and apply correct tags. Done.
A paragraph is just that, a paragraph. A heading is just that. A table and an
image are a table and an image. Don't make it more complicated that necessary.
Styling is something you shouldn't worry about (at least not too much) while
marking up your content.

Once you have a HTML page, you can style it preferably with CSS2 in a separate
style sheet. You can start at <http://www.w3.org/MarkUp/Guide/Style.html> and
get further information at
<http://www.w3.org/TR/2002/WD-CSS21-20020802/cover.html>.
Again, don't let the vast amount of information on this subject scare you off.
CSS is more complicated than HTML (at least that is my experience with it),
but it is manageble.

If all this seems to be too much, and is really not necessary for your
purposes (a small, personal website, intended for people you know), again, you
could try to work with a tool that requires (seemingly) less knowledge, like a
WYSI(n)WYG editor. Just remember that the code generated with such a tool will
most likely not be compliant, not be very accessible and usable outside the
browser situation that comes with Windows and Internet Explorer.
Than again, it is as quick as it is dirty, and if your family and friends use
only Windows and Internet Explorer, who cares?


--
,------------- PretLetters: 'woest wyf', met vele interesses: --------------.
| weblog | <http://home.wanadoo.nl/b.de.zoete/_private/weblog.html> |
| webontwerp | <http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html> |
| zweefvliegen | <http://home.wanadoo.nl/b.de.zoete/html/vliegen.html> |
`---------------------------------------------------------------------------'
 
S

SpaceGirl

Neal said:
I'll race you. You turn your XHTML transitional document into XHTML 1.1,
and I'll turn my HTML 4.01 Strict document into XHTML 1.1.

Point: when I "need" it - and I doubt I ever will, but for the sake of
argument - it'll take me no time at all to translate the files.

.... and the point of that would be?

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
S

SpaceGirl

Neal said:
... no different than the point of using XHTML now. That is, pointless.

XHTML isn't pointless; it encourages "correct" markup. If you are going
to learn, XHTML makes more sense simply because the structure makes more
sense. HTML4.01 is far to loose, and teaches you right away to write
messy markup.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
L

Leif K-Brooks

SpaceGirl said:
Okay, good point. But XHTML strict is VERY unforgiving, and IE hates it.
Transitional is an easier learning curve.

To quote you, "Dont wait until you HAVE to write it or it'll be
panic-panic. Now is a good time to get into it, learn the structure and
the 'whys' and 'hows'." That statement really applies to (X)HTML Strict
better than it does to HTML: it would be relatively easy for a browser
to implement both XHTML and HTML, but harder to implement presentational
HTML; what makes you think that browsers will drop support for HTML in
the foreseeable future?
 
C

C A Upsdell

Ed said:
It's many, many years since I wrote anything in HTML, so in effect I am
a totally new user who wants to write and publish a small website for
family/friends to use. It is not really intended for general public
consumption.

I have sketched out on paper a plan of the content of the website and
the links between the various pages. But what tools should I use to
write the necessary code?

I had intended to just use HTML 4.0 with some javascript to plug some
gaps. But then I read on this site that frames are best avoided - and I
was going to use them extensively in my website! Iframes don't seem to
be thought of as a really good alternative. The use of tables too seems
to come in for some criticism unless they are used for absolutely pure
data reasons. And the use of javascript seems to only get a lukewarm
reception. And even some familiar tags like <center></center> are
outdated I think?

I'd like to start coding up to a good standard. Further reading here,
seems to suggest that I could produce a good basic website, usable
within Firefox and IE, by coding in XHTML along with CSS and some
javascript where necessary. I'm not familiar (too old I guess) with
other things like SSI, CGI, ASP, DHTML/Layers, XML etc..

I would like to try to adhere to correct standards from the off and
would welcome any comments as to if XHTML and CSS are the best tools to
begin with? And is there a definitive site which describes these?

First, use a Strict DOCTYPE, either HTML 4.01 or xHTML 1.0, and validate
your work frequently. This will enable you to quickly find out which
HTML you should be using, and which you should not. Also, you will
learn a lot by analyzing your mistakes.

Second, use CSS exclusively for styling. Validate it too.

Third, build once to throw away: build the site through a trial and
error process, learning as you go along, until the site does what you
want it to do. Then throw away your work and start again from scratch:
by this time you will have learned a lot, and your second design willl
be a lot cleaner than your first.
 
E

Ed

Beauregard said:
<waves hand/>

New documents should be Strict, not Transitional, whether they be XHTML
or HTML.

It's happened, just as I feared. I asked for some help/advice in my
original posting, hoping for a clear way forward, but the result seems
to have generated a debate amongst yourselves about the pros/cons of
various protocols etc.

I really do want help from you guys. You know so much. But for me,
tarting from the beginning with no legacy systems to worry about, would
XHTML and CSS and a bit of javascript be a good basis on which to launch
a website?

So far, I am confused by all your replies to each other.

I really don't know how to proceed now?

Ed
 
E

Ed

Barbara said:
It's many, many years since I wrote anything in HTML, so in effect I
am a totally new user who wants to write and publish a small website
for family/friends to use. It is not really intended for general
public consumption.


That doesn't really matter, as it will be available to the general
public if you publish on the www.
I have sketched out on paper a plan of the content of the website and
the links between the various pages. But what tools should I use to
write the necessary code?


You can try to code by hand and use a editor that colors markup tags
for example. For coding html I use Textpad available at
<http://www.textpad.com/> and for CSS I use TopStyle Lite available at
<http://www.bradsoft.com/download/index.asp>.
If accessiblity and usablitily is no issue at all for you (you really
intend all of the content to be displayed and available only to people
you know, _AND_ you don't care for possible other visitors) you might
want to try a WYSI(n)WYG editor. But only than.


[on frames]

Frames are generally not such a very good idea, because it is hard to
code them correctly. That is to code them such that a visitor without
frames capability still gets to the content s/he wants to. Read some on
this frames discussion by looking at
<http://www.google.com/search?q= your+browser+doesn't+support +frames>.

[on center, HTML and CSS]

Since you haven't done any html for some substential time, you best read
up on what is currently available for HTML4.01 at
<http://www.w3.org/MarkUp/Guide/> and <http://www.w3.org/TR/html401/>.
Don't let the amount of information scare you off.

Writing with html isn't at all hard. Think 'semantic markup'. As you
write your content think what it is (not what it should look like).
Find the correct element in the specifications and recommandations and
apply correct tags. Done.
A paragraph is just that, a paragraph. A heading is just that. A table
and an image are a table and an image. Don't make it more complicated
that necessary. Styling is something you shouldn't worry about (at
least not too much) while marking up your content.

Once you have a HTML page, you can style it preferably with CSS2 in a
separate style sheet. You can start at
<http://www.w3.org/MarkUp/Guide/Style.html> and get further information
at <http://www.w3.org/TR/2002/WD-CSS21-20020802/cover.html>.
Again, don't let the vast amount of information on this subject scare
you off. CSS is more complicated than HTML (at least that is my
experience with it), but it is manageble.

If all this seems to be too much, and is really not necessary for your
purposes (a small, personal website, intended for people you know),
again, you could try to work with a tool that requires (seemingly) less
knowledge, like a WYSI(n)WYG editor. Just remember that the code
generated with such a tool will most likely not be compliant, not be
very accessible and usable outside the browser situation that comes
with Windows and Internet Explorer.
Than again, it is as quick as it is dirty, and if your family and
friends use only Windows and Internet Explorer, who cares?
Thanks Barbara, that's really helpful.

Ed
 
B

Barbara de Zoete

It's happened, just as I feared. I asked for some help/advice in my
original posting, hoping for a clear way forward, but the result seems to
have generated a debate amongst yourselves about the pros/cons of various
protocols etc.

I really don't know how to proceed now?

Did you actually read Message-ID opsjpz1eszx5vgts@zoete_b [1]? What is it you
mis to get you started? Where do you see the debate there?



[1] or through Google if you don't know how to retrieve a single message by
its ID:
<http://groups.google.com/groups?selm=opsjpz1eszx5vgts@zoete_b>


--
,------------- PretLetters: 'woest wyf', met vele interesses: --------------.
| weblog | <http://home.wanadoo.nl/b.de.zoete/_private/weblog.html> |
| webontwerp | <http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html> |
| zweefvliegen | <http://home.wanadoo.nl/b.de.zoete/html/vliegen.html> |
`---------------------------------------------------------------------------'
 
K

Karl Core

It's happened, just as I feared. I asked for some help/advice in my
original posting, hoping for a clear way forward, but the result seems to
have generated a debate amongst yourselves about the pros/cons of various
protocols etc.

I really do want help from you guys. You know so much. But for me,
tarting from the beginning with no legacy systems to worry about, would
XHTML and CSS and a bit of javascript be a good basis on which to launch a
website?

So far, I am confused by all your replies to each other.

I really don't know how to proceed now?

You're a newbie. Start wherever you want.
XHTML would seem to make sense, because (esp. if you write to the strict
DTD) it will help you in the future.
There's a lot to learn, and despite the way it sounds, none of us know it
all. Start wherever you want and build from there.
 
E

Ed

C said:
First, use a Strict DOCTYPE, either HTML 4.01 or xHTML 1.0, and validate
your work frequently. This will enable you to quickly find out which
HTML you should be using, and which you should not. Also, you will
learn a lot by analyzing your mistakes.

Second, use CSS exclusively for styling. Validate it too.
Is CSS used for something other than styling? I'm intrigued to learn
more? And if so, why not used these extra possibilities?

Ed
 
E

Ed

Barbara said:
Did you actually read Message-ID opsjpz1eszx5vgts@zoete_b [1]? What is
it you mis to get you started? Where do you see the debate there?



[1] or through Google if you don't know how to retrieve a single message
by its ID:
<http://groups.google.com/groups?selm=opsjpz1eszx5vgts@zoete_b>

Barbara, that's a really scary reply to a newbie. I have no idea what
you are banging on about wrt a Message-ID.

All I was looking for, was some plain guidance, and indeed you have
helped me as I've indicated in my reply to you.

But why do you guys cause us newbies to be so afraid of asking for help
when you reply with so much gobble-de-gook.

Good practice should always be explained in simple terms.

Ed.
 
C

C A Upsdell

Ed said:
Is CSS used for something other than styling? I'm intrigued to learn
more? And if so, why not used these extra possibilities?

Generally for controlling how the page. This includes styling, but also
includes positioning, controlling layers, and other things. But you're
best off with just using the styling features at first: one reason
being that other things tend to be browser dependent, and poorly
implemented by some browsers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top