Most history web sites should be considered secondary sources; that is, the author will have collected images, sounds, and writings that may themselves be primary sources, but, having been put together as a web page by an author they comprise a secondary source. Most history web sites will also have commentary or analysis written by the web page author that definitely constitute secondary source material and should not be used as primary source material. Photos, images, sound recordings, etc., that you take from web sites can be used as primary sources, but you must cite the secondary source they came from, making sure to credit the web page author with collecting the images or sounds into one location for you. Some online sources, such as the Library of Congress or the National Archives, have parts of their collections (such as letters, photos, diaries) digitized and on the internet and these may be considered primary sources as well, just make sure to attribute the item you use to its source.
Guide to Using Primary Sources on the Web by the Association of College and Research Libraries.