CTVS is a novel data extraction and alignment method that combines tag and value similarity to extract data from query result pages. It first identifies and segments query result records in the pages and aligns them into a table with data values from the same attribute in the same column. CTVS handles cases where records are not contiguous due to auxiliary information and any nested structures within records. It also designs a new record alignment algorithm that aligns attributes pairwise and holistically using tag and value similarity. Experimental results show CTVS achieves high precision and outperforms existing methods.