< HTML < Overzicht attributen

HTML

Inhoudsopgave
  1. Verklarende woordenlijst
  2. Overzicht tags
  3. Overzicht attributen
  4. Andere cursussen

Functie

Dient om de achtergrond kleur van iets te bepalen. Dit attribuut kan worden gebruikt bij de elementen body, table, tr en td of th om respectievelijk de achtergrondkleur van een pagina, tabel, rij of cel te bepalen. Dit attribuut is verouderd in HTML 4.01 en wordt niet meer ondersteund door XHTML. Daarom wordt er aangeraden om CSS of het attribuut style te gebruiken om de achtergrondkleur te bepalen.

Waarde

Je kunt kleurnamen of kleurcodes ingeven als waarde.

Voorbeeld

HTML-code: Een voorbeeld van het gebruik van de bgcolor attribuut

<table border="1">
        <tr>
                <td bgcolor="green">Wikipedia</td>
                <td>Wikibooks</td>
        </tr>
        <tr bgcolor="#FF0000">
                <td>Wikiquote</td>
                <td>Wikinews</td>
        </tr>
</table>
Wikipedia Wikibooks
Wikiquote Wikinews

Wordt gebruikt bij

body, table, td, th, tr

Meer informatie

w3 (Engels)


HTML attributen

abbr | accept | accept-charset | accesskey | action | align | alt | archive | axis | background | bgcolor | border | cellpadding | cellspacing | char | charoff | charset | checked | cite | class | classid | clear | code | codebase | codetype | color | cols | colspan | compact | content | coords | data | datetime | declare | defer | dir | disabled | enctype | face | for | href | id | lang | style | title | width

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.