Search code examples
htmlcssgithub-pagesitalic

Italic tag not being formatted in Github Pages


I'm working on a webpage with Github Pages, and I wrote <li> alpha <i>beta</i> </li> in a Markdown file, which is used to create the html page. The following pictures are 1- what I see in the inspect box, while on the page, and 2-What is visible on the webpage. "beta" should be in italic, but isn't formated somehow. Is this a known issue, am I doing something wrong?

One Two


Solution

  • If you wish to get the italic format of text you should use css. According to MDN:

    "... A browser will typically still display the contents of the element in italic type, but is, by definition, no longer required to..."

    And:

    Typically this element is displayed in italic type. However, it should not be used simply to apply italic styling; use the CSS font-style property for that purpose.

    you can read more about the i element here.