24 of 133 menu

The style attribute

The style attribute allows you to write CSS code for a specific tag of an HTML page.

Example

Let's use the style attribute to set the first paragraph to a red text color and a font size of 20px:

<p style="color: red; font-size: 20px;">text</p> <p>text</p>

:

See also

  • tag link,
    with which you can connect a CSS file
  • tag style,
    with which you can write CSS code
  • attribute class,
    which assigns classes to elements
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline