Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

Semantic HTML: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
Línia 51: Línia 51:
=== Books: ===
=== Books: ===


* [http://www.zeldman.com/dwws/ Designing with Web Standards, 2nd ed.] by Jeffrey Zeldman
* [http://www.zeldman.com/dwws/ Designing with Web Standards, 2nd ed.] by Jeffrey Zeldman - This book is the single most useful source for getting you on track for writing semantic code. Highly recommended!


== See also ==
== See also ==

Revisió del 09:17, 27 maig 2009

The case for semantic HTML

It is easy to create HTML that works, but current best practice suggests that creating valid and Semantic HTML is an important goal for various reasons including user experience and accessibility.

Unfortunately, while validation is a relatively easy task to understand and achieve, creating Semantically correct HTML is a lot more subjective and open to debate.

Examples for semantic HTML

Instead of writing something like

 <a href="#" name="d16">
   <img id="vh_div16indicator" src="pix/closed.gif" alt="Closed folder">
     Security
 </a>

you better write this (with some accompanying CSS):

  • <a href="#">Security</a>
  • (Examples taken from Moodle's Site Administration block.) For more examples how to make Moodle HTML more semantic you might have a look at this work in progress: Frank Ralf/Semantic HTML1.

    Further resources

    Online:

    Books:

    See also