![]() |
| Home | Demo | Services | Features | Help | User Forum | Blog | About | |
|
#1
|
|||
|
|||
|
I am very new at being a webmaster and to html. I did most of the coding myself by hand through different online tutorials. I ran my website through http://validator.w3.org and I received a lot of error codes and i really do not understand them. Everything on my page seem to show up perfectly well but i would like to fix any mistakes so that my website will run smoothly.
Quote:
Quote:
Quote:
__________________
Jacqueline Visit the Largest Online Database of FREE Marketing Ideas Over 500 Marketing Ideas Spanning 22 Types of Marketing |
|
#2
|
|||
|
|||
|
The problem is that you are using numerous outdated methods of coding your page. Browsers still support these methods, to keep old pages from breaking, but if you are designing a new website, you should use XHTML, which is the newest version of HTML.
One difference between HTML 4 and XHTML is that XHTML requires that you use CSS to tell the browser how your page should look. Also XHTML gets rid of the these tags, and others: font, b, i, u. Before going on you should read these two tutorials: http://www.w3schools.com/xhtml/default.asp http://www.w3schools.com/css/ They are long, but you should read them completely. |
|
#3
|
|||
|
|||
|
just looked at your page and your using xhtml 1.0 strict? well a few mistakes.. things like your line breaks
- writing it like that is html 4.01 not xhtml. In xhtml most stuff is implicitly closed like so notice I've added a space and forward slash not just forward slash as some have a tendecy to do and is wrong. problem is your page code not written correctly in some place or implicitly closed correctly. Nice work though and pleased to see your trying to get up to standards |
|
#4
|
||||
|
||||
|
Quote:
Quote:
In XHTML attributes and elements must be all lower-case. That's what the validator tells when saying "element 'B' undefined" ("B" is upper-case). The attrubutes "color" and "font" is not HTML, it's styling the content and must be used only with style (e.g. <p style="font:arial"> ) or better yet, in a external style sheet. Most errors is explaned under eatch error message. Some of them with several possible solutions that makes it easier to test, others can be more difficult to understand and need more use of the authors brain to solve The errors "reference not terminated by REFC delimiter" is explaned with " If you meant to include an entity that starts with '&', then you should terminate it with ';'." So adding the ; to eatch   will eleminate the errors, since all entity must allways start with & and end with ; One more useful site to learn HTML and CSS is http://www.htmldog.com and there are others, but so far you now have some "starters" |
|
#5
|
|||
|
|||
|
Thank you for your help so far. I am pretty sure that I am doing this right
Code:
<p class="center">[img]pacific.jpg[/img]</p>
__________________
Jacqueline Visit the Largest Online Database of FREE Marketing Ideas Over 500 Marketing Ideas Spanning 22 Types of Marketing |
|
#6
|
|||
|
|||
|
The code you included there wouldn't do anything unless you have a class called "center" that includes the appropriate CSS attributes.
It's not a good idea to use this name because of possible confusion, but something like this would work if it were included within your CSS definitions: Code:
.center {text-align: center}
|
|
#7
|
||||
|
||||
|
What class is that "center"? do you have any such class defined in your style sheet? Probably not and you're confusing align="center" with class="center" .
But align is not allowed in XHTML, so you must use class. If you use class, you must have it defined in the css file. Best to avoid usign the common name center though, call it something else. Say it will be class="myclass1" and in the css file you have: Quote:
__________________
Christina >>Forum Moderator<< Please do not PM me for support. The forum is here for that. |
|
#8
|
||||
|
||||
|
Hi Jacqueline
I never reply to gambling posts... so *deep breath* here I go... If your website works the way you want it in all browsers then in my humble opinion (which is always right) you can tell w3c validation to go to hell Mark |
|
#9
|
|||
|
|||
|
Quote:
|
|
#10
|
|||
|
|||
|
Quote:
Classes should generally be used only for elements that appear on every page, or often on pages. For something that appears only once or twice throughout the site it would be better to use the id attribute of the p tag(the element) to define it's style. So you would use: Code:
<p id="pacific_image">[img]pacific.jpg[/img]</p> Code:
#pacific_image {
text-align: center;
}
If you are sure that the element will only be used on one page it is even better not to use the id method, but rather to declare the style once right on the page. Many people will tell you otherwise, and everyone to their own way, but I find that using the style attribute to declare the style for content elements(like to center an image in a blog post, etc.) to make more sense. This is because the content of a page may change a lot, depending on how much you update it, so adding to the CSS file every time you want to center text or an image becomes tedious and unnecessary, and clutters the CSS file, making it harder to work with. So for elements that will not be updated a lot, such as images and divs for the layout, use a class in the CSS file. But for actual content that will be updated, use an inline style declaration so you don't have to go to the file, find the class name, then go to the CSS file and find the class in there, just to edit the text alignment. This is how you use an inline style: Code:
<p style="text-align: center;"><img...></p> |
![]() |
| Thread Tools | |
| Display Modes | |
|
|