How do I create a webpage with a header, content, and a footer. I am using TextEdit on my Mac and saving the file with a .HTML extension.
A:
I assume you have some ability to run a scripting language on your host, so just write a header and footer file, and include those in your content page with your dynamic language of choice.
Alex Fort
2009-03-04 21:12:26
+3
A:
You can go through the 3+3 tutorials for HTML and CSS on HTML Dog.
cherouvim
2009-03-04 21:13:02
RTFM is hardly a good answer.
Sunny
2009-03-04 21:16:25
@Sunny: The question was very basic and my answer did not have any RTFM tone in it :)
cherouvim
2009-03-04 21:21:07
Undoing the downvote, as the OP accepts this, but still its better to provide a solution :)
Sunny
2009-03-04 21:27:52
@Sunny: Thanks. I still think that in this case the solution is to point the author to the tutorial itself instead of trying to guess what he means or copy pasting huge tutorial sections in here.
cherouvim
2009-03-04 21:31:23
A:
create an html file paste this frames :
<html>
<frameset rows="25%,50%,25%">
<frame src="header.htm">
<frame src="content.htm">
<frame src="footer.htm">
</frameset>
</html>
and then create your header, content and footer files in same directory.
Canavar
2009-03-04 21:14:32
Yes, frames suck but it's the only way to do modularization in a static html environment. So ++
cherouvim
2009-03-04 21:20:08
No one is asking about file modularization. So this is heaping bad upon bad.
Rex M
2009-03-04 21:21:51
@Rex M: The question was very vague and it was not clear what the intention was.
cherouvim
2009-03-04 21:25:01
@Rex M : strange people, he is not asking about file modularization, ok, but not asking for one and only one file.. it's an answer, and not wrong, like or dislike..
Canavar
2009-03-04 21:28:33
A:
Optionally, you can put each section in a separate file, or specifically the header and footer in separate files to be reused.
<html>
<head><title>my title</title></head>
<h1>My Header</h1>
<p>The quick brown fox jumps over the lazy dog.</p>
<h4>My footer</h4>
</html>
my title
My Header
The quick brown fox jumps over the lazy dog.
My footer
Optionally, you can put each section in a separate file, or specifically the header and footer in separate files to be reused.
Chris Ballance
2009-03-04 21:15:54
A:
If your web server is Apache (I would guess on Mac), you can use server-side includes:
<html>
.....
<body>
<!--#include virtual="myheader.html" -->
YOUR CONTENT GOES HERE
<!--#include virtual="myfooter.html" -->
</body>
Sunny
2009-03-04 21:25:01