Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do valid coding
#1
A lot of admins do know some bits of HTML. That's great because you can add more content to your site and modify it better.
But please stick to the standards MyBB does use, do valid coding.
MyBB 1.4 does use XHTML 1.0 and that means that you should care about the following rules:

- Look out for opened but not closed tags. Example: You opened
Code:
You are not allowed to see code.
but you did not close it with
Code:
You are not allowed to see code.
lateron
- HTML tags and attributes are written in lowercase letters in XHTML. Avoid
Code:
You are not allowed to see code.
Code:
You are not allowed to see code.
and use lowercase instead:
Code:
You are not allowed to see code.
and
Code:
You are not allowed to see code.
- Every <img-tag requires an "alt" attribute, for example:
Code:
You are not allowed to see code.
- XHTML tags which are not closed with a second tag must be closed with /> Example: do not use <br> but <br /> instead.
- Use CSS and not older standards. Avoid tags like <b> <center> or other old tags. Use <strong> and <p style="text-align:center;"> instead.
Remember: HTML shall structure your site and not design it - that's what CSS is made for.

Control your coding with the official W3C validator:
http://validator.w3.org

I hope this is useful for somebody, if you have any questions feel free to ask.

Kind regards
Lennart Sauter
Forum Admin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)