HTML Template

Reaction score
341
This is my first real HTML template where I tried to make the HTML/CSS standard, but you guys will most likely find errors.

Also to make it look decent :thup:

It's nothing fancy, only has two images.

http://blizzvault.com/mine/simpleblue/#

EDIT: Forgot about other browser compatablility, looks like shit in IE.
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
Your site doesn't validate with XHTML Strict 1.0

Include the code in your page

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

You can't have your <head> tags inside your <body> tags.
You can't use the same "id" in a div tag. You can't redefine an id.


Don't design a site using tables use CSS instead.
Look here:
http://www.maxdesign.com.au/presentation/center/

or even our own tutorial

http://www.thehelper.net/forums/showthread.php?t=134497


I suggest you start learning how to properly use HTML/CSS before making actual sites.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

I've never seen anyone do the doctype like that.... Always one line.
But it definitely does make it easier to read.
 

UndeadDragon

Super Moderator
Reaction score
447
CSS tips:

Code:
	border-style: 	solid;
	border-width: 	1px;

Can be replaced with:

Code:
	border: 1px solid COLOR;

-------------------

Code:
	padding-left:   2%;
	padding-top:    2%;
	padding-bottom: 2%;
	padding-right:  2%;

Can be replaced by:

Code:
	padding: 2%;


-------------------

Code:
	margin-top: 	5%;
	margin-left:    auto; 
	margin-right:   auto;

Can be replaced by:

Code:
	margin: 5% auto 0 auto;

-------------------

There isn't really much point in the table, because it has one row and one column. You can simply replace that with a div.

I think that has just about covered the mistakes.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Here's the XHTML template I use, whenever I make a page:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
  <title>InsertTitleHere</title>
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
  <meta name="description" content="EnterDescriptionHere" />
  <meta name="keywords" content="Enter, Keywords, Here " />
  <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>
 </body>
</html>

Validates correctly as XHTML 1.0 Strict.
 

Samuraid

Advisor
Reaction score
81
No character encoding, add that in a meta.
He already included a character encoding:
Code:
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />

Although to be technically accurate, that encoding needs to be different depending on the browser, and there also needs to be an XML encoding specified at the very top:
Code:
<?xml version="1.0" encoding="UTF-8"?>
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top