HTML CSS

作者: eesly_yuan | 来源:发表于2015-01-16 16:08 被阅读62次

    reference codecademy-make a website


    Web pages are created using HTML and CSS.

    • HTML is used to write a web page's content.
    • CSS is used to define the design and layout of the page

    CSS Rules. CSS uses rules to style HTML elements. Here's how CSS rules work:

    • A CSS rule starts with a selector. A selector specifies which HTML elements to style. Here the h1 CSS selector selects all h1 HTML elements on the page.
    • Inside the braces { }, a property and its value define what aspect of the h1 elements to style. Setting the color property to red changes the color of the h1 element to red.
    • Together, a selector and its property-value pairs are called a CSS rule.

    Selector

    • HTML elements can be CSS selectors, but they're not the only selectors available. Another available selector is the class selector.
    • Combining Selectors .header p
      This CSS selector selects any p element nested inside an HTML element with the class named header.

    color

    • We can use color names to change the text's color. But this only works for 140 colors.
    • Instead, we can use RGB values or hexadecimal numbers.
      RGB values range from 0 to 255, with 255 being the brightest.
      Hex numbers vary from 00 to ff, with ff being the brightest

    font-family

    • Three fonts commonly used with font-family are:
      font-family: Arial, Helvetica, sans-serif;
      font-family: "Times New Roman", Times, serif;
      font-family: "Courier New", Courier, monospace;
    • Google Fonts is a free collection of over 600 more web fonts that you can use on your page.

    font-size

    • Text size can be measured in pixels, ems, or rems.

    layout Bootstrap

    相关文章

      网友评论

          本文标题:HTML CSS

          本文链接:https://www.haomeiwen.com/subject/kwmcxttx.html