An warware: yadda ake canza launi h1 a cikin html

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.

Shafi posts:

Leave a Comment