Getting Started with HTML knowledge (2)

Third, the commonly used tags

  1. Basic tab

       标签        			含义      		说明                       
      br           			换行标签    		非关闭型                     
      p            			段落标签    		关闭型、块级标签、前后有明显的间隔        
      h1、h2......h6		标题标签    		按照h1到h6逐渐变小、块级标签、加粗显示    
      pre          			预格式化文本标签	保留编码时的格式                 
      div          			分区标签    		常用作容器来使用,一般用于页面的布局划分,块级标签
      span         			范围标签    		默认没有任何效果,一般用来设置行内的特殊样式   
      ol、li        		有序列表    		有顺序的项目列表                 
      ul、li        		无序列表    		无顺序的项目列表                 
      dl、dt、dd     		定义列表    		对术语、图片等进行描述而定义的列表        
      hr           			水平线标签   	非关闭型标签,块级标签              
      img          			图像标签    		非关闭型标签,行级标签              
    

1.1 ordered list

ol:ordered list

li:list item

Default Arabic numerals starting from 1 marked, attributes can be changed by

  • type property: Set list symbol mark, value; number 1 (default), letter (a or A), the Roman numerals (i or I)
  • start properties: setting the start value must be a numeric value

1.2 unordered list

ul:unodered list

li:list item

As a symbol mark, can be modified through the use of default attributes table filled circles

  • property type: set list symbol tag values: disc solid circle (default), circle (open circles), square (square), none does not show the bullet

1.3 Definitions List

dl:definition list

dt:definition title

dd:definition description

1.4 horizontal label

hr:horizontal

Common attributes:

  • color: Color
    two ways to write methods:
    Color Name: such as red, green, blue, white, black, pink, orange and the like
    hexadecimal notation RGB: Red, Green, Blue Usage: for each color in the range #RRGGBB 0-255, converted to hexadecimal FF-00
    EG: # 0000FF # FF0000 red white blue #FFFFFF #CCCCCC # FF7300
  • size: thickness, the value
  • width Width:
    two way:
    the pixel: the absolute value (fixed value)
    Percentage: relative value, with respect to the percentage of the parent container where the horizontal width of the label
  • align alignment
    value: center left right center

1.5 image tag

img:image

Common image formats:.jpg .png .gif .bmp

Common attributes:

  • src: source specified image path (source), triple the number mandatory
    if the picture with html source code in the same folder, you can write the name of the picture directly in the src can be
    a habit, we will be more pictures and html code project documents were placed in different directories with a file folder, you need to specify the path in the src picture at this point is a relative path
    .\表示当前目录
    ..\表示上级目录
  • alt: When a message can not be displayed in the picture
  • title: message when the mouse over the picture shows
  • width and height: height and width of the image set
    default image is displayed in its original size
    if only one set, the other will be scaled
    If both wide and high, may result in a distorted image
    two way:
    the pixel: the absolute value (fixed value)
    percentage: relative value of the percentage with respect to the size of the parent container
Released two original articles · won praise 0 · Views 98

Guess you like

Origin blog.csdn.net/lan_baobao/article/details/104495911