Babu takamaiman amsa ga wannan tambayar. Yawanci, lokacin da kake son canza launi na h1 element a HTML, kuna buฦatar amfani da takardar salo ko fayil ษin samfuri wanda ya haษa da takamaiman umarnin don canza launi na abubuwan h1.
<h1 style="color:red;">This is a red heading</h1>
Wannan layin lambar HTML ne. Yana haifar da jigon jigo, kuma yana ba shi sifa mai salo tare da ฦimar "launi: ja;". Wannan yana sa rubutun da ke cikin rubutun ya zama ja.
Canza launuka
Akwai ฦดan hanyoyi don canza launuka a cikin HTML. Hanya ษaya ita ce amfani da kayan launi. Misali, zaku iya amfani da kayan launi don canza launin rubutun wani abu:
Rubutu na shudi ne
Hakanan zaka iya amfani da hsl() da hsla() kaddarorin don canza launuka. ฦimar hsl() tana ษaukar ฦimar hue (a cikin digiri), kuma hsla() dukiya tana ษaukar ฦimar jikewa (a cikin kashi). Misali, zaku iya amfani da waษannan kaddarorin don canza launin rubutun wani abu:
Rubutu na shudi ne
Rubutu na kore ne
Sannu Duniya!
css layi
Salon css na layi shine salon da aka sanya shi a cikin nau'in HTML iri ษaya kamar rubutun da yake tsarawa. Wannan yana nufin cewa css za a yi amfani da shi a kan rubutun kamar yadda ake fassara shi, maimakon lokacin da mai bincike ya zazzagewa da rarraba HTML. Wannan na iya zama da amfani ga hanzarta lokutan loda shafi, saboda za a yi amfani da css a wurin maimakon a zazzage shi sannan a sake yin nazari.