I'd love to see the code for what you did. Thanks for that.
Where does HTML stand? Is straight HTML still viable? And how different is XHTML?
Its a good question. I presume HTML is still viable, but their are different tags and elements wih xHTML. I'm still not an expert myself tbh.
Consider the code for what I did - i will replace
<> with
()
HTML tag
(html)
(/html)
inside the HTML tag, we place the head and body tags
(html)
(head)
(/head)
(body)
(/body)
(/html)
Keepting things simple, we'll not place and document type declaration in the head tag, nor will we add meta-tags in this example. Instead, we will add an internal style sheet using CSS.
CSS is simple. You have a selector (e.g. body) a property (e.g. background-color) and a value (e.g. red).
(html)
(head)
(style type="text/css")
body {
color: #333;
background-color: #FFFFFF;
}
()
(/head)
(body)
(/body)
(/html)
Next we'll add some div tags. In this case we want a wrapper, a header, a sidebar, a content and a footer. We'll place these in the body of the document.
(body)
(div id="wrapper")
(div id="header")(/div)
(div id="sidebar")(/div)
(div id="content")(/div)
(div id="footer")(/div)
(/div)
(/body)
we've given them id's that will relate to the CSS style sheet in the head tag.
it's simply a case of styling each div tag using css. For example: -
#wrapper {
margin:auto;
width:500px;
background-color:#fff
color:#666;
}
#header {
width:100%;
margin:0;
padding:0;
height:50pc;
background-color:red;
}
etc. etc.
and then we place this code inside the head tag with the rest
(html)
(head)
(style type="text/css")
body {
color: #333;
background-color: #FFFFFF;
}
#wrapper {
margin:auto;
width:500px;
background-color:#fff
color:#666;
}
#header {
width:100%;
margin:0;
padding:0;
height:50pc;
background-color:red;
}
(/head)
(body)
(div id="wrapper")
(div id="header")(/div)
(div id="sidebar")(/div)
(div id="content")(/div)
(div id="footer")(/div)
(/div)
(/body)
(/html)