HTML and CSS basis

  1. classes 和 IDs 的不同
    • class 选择器用于描述一组元素的样式,class 选择器有别于id选择器,class可以在多个元素中使用。
  2. HTML 元素 elements
    • 从开始标签(start tag)到结束标签(end tag)的所有代码。
    • 例子

      peculiarly
  3. What are tags?
    • The basic structure of an HTML document includes tags, which surround content and apply meaning to it.
    • demo: opening tag and closing tag
  4. What are forms?
    • 标签用于创建供用户输入的 HTML 表单。
  5. What is a div?
    • 可定义文档中的分区或节(division/section)。
  6. What is the difference between "pixels" and "ems"?
    • px像素(Pixel),相对长度单位。px 是相对于显示器屏幕分辨率而言的。
      • IE无法调整那些使用 px 作为单位的字体大小;
    • em 是相对长度单位,相对于当前对象内文本的字体尺寸。如当前对行内文本的字体尺寸未被人为设置,则相对于浏览器的默认字体尺寸。
      • em 的值并不是固定的;
      • em 会继承父级元素的字体大小。
  7. CSS 继承
    • inherit
    • 例子

      div{color: red;} .extra div{color: inderit;}
  8. 移动页面元素的两种 CSS 属性
    • float
    • position
  9. CSS 插入样式表的三种方法
    • 外部样式表(External style sheet)
      • 例子

        
        
        
    • 内部样式表(Internal style sheet)
      • 例子

        
        
        
    • 内联样式(Inline style)

      • 例子

        A paragraph.

你可能感兴趣的:(HTML and CSS basis)