The invention discloses an information hiding and extracting method based on an HTML (Hypertext Markup Language) label attribute sequence. The method comprises the following steps: step 1, determining to-be-hidden information, and converting the to-be-hidden information into a binary Unicode; step 2, determining representing methods of '0' and '1' corresponding label attributes, wherein '0' is represented by two attributes of two different labels, and '1' is represented by two attributes of a same label; step 3, determining a sequence code K, wherein the Unicode consists of 8 binary numbers; selecting nine '1' (one more selected), randomly inserting a plurality of '0' among the nine '1' so as to form the current-time information hiding sequence code K; step 4, determining nine label attributes according to the sequence code K, sequentially putting the nine label attributes on the '1' positions, supplementing residual label attributes, sequentially putting the residual label attributes on the '0' positions so as to synthetize an HTML file label attribute sequence; and step 5, editing codes according to the HTML file label attribute sequence. The method has the beneficial effects that a database is not needed for support, and the webpage execution efficiency is greatly improved.