HTML and CSS are used to build websites. HTML provides the content and structure, while CSS handles the styling and layout. Some key HTML elements include headings, paragraphs, images, and links. CSS can control colors, fonts, spacing and more. Websites are coded using tags like <p> for paragraphs and <h1> for main headings. The first lines of code in an HTML file are always <!DOCTYPE html> followed by <html> and <head> tags, with the <body> tag containing the visible page content.