html - How to add custom tag to a header to make the font size larger in WordPress? -


i'm self-taught novice seeking guidance experts here. need defining css in wordpress change font size, color , weight of header on website page.

so far, code have is:

<h2><strong><a style="color: #3f51b5">text header need 30 pixels large , in bold. size here still small. </strong></h2> 

how change font 30 pixels large , bolder?

apologies if asked , answered before, search results here did not address issue. thank in advance help. first question group.

i follows:

  1. i add following rule css file being used in theme under usage:

.fs30 { font-size: 30px; font-weight: bold; }

  1. this code needed in html:

<h2><strong><a class="fs30" style="color: #3f51b5">text header need 30 pixels large , in bold. size here still small. </strong></h2>

if style not applied, have 1 of following problems:

  • your css file not being used
  • your css file being cached
  • a rule higher priority overrides rule fs30

all these problem types well-documented.

edit: needed following rule: font-size: 30px; font-weight: bold; can add rule in several possible ways:

  1. style="font-size: 30px; font-weight: bold;" inside tag header

  2. .fs30 {font-size: 30px; font-weight: bold;} inside <style> tag

  3. .fs30 {font-size: 30px; font-weight: bold;} inside external css file

for approaches 2. , 3. need add class="fs30" attribute target tag(s). approach 1. inferior approach 2. , 3., due following facts:

  • the style attribute not reusable, if want reuse tag, have copy it. if have copied 200 times , want change design, have change 200 cases
  • style attributes structurally irrelevant, purpose solely design-related , unneededly makes code messy
  • if want study design, have read html code well, not interested in when study design

so, instead of style attribute, need style tag or external css file. however, external css files superior compared style tags. html code smaller way, also, very important css file cached browsers, reducing size of data needed downloaded on further extractions, therefore users experience bigger speed, while server more scalable. not mention fact external css files more reusable style tags, duplicate link tag (1 line of code) instead of thousands of lines if needed.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -