HTML stands for Hypertext Markup Language. It is the standard language used to create web pages. HTML code is written using tags. Tags are enclosed in angle brackets and are used in pairs. The opening tag marks the beginning of an HTML element, while the closing tag marks the end. Content is placed between the opening and closing tags.
<html> <head> <title>My Web Page</title> </head> <body> <h1>Welcome to My Web Page</h1> <p>This is a paragraph of text.</p> </body> </html>
CSS stands for Cascading Style Sheets. It is used to style and layout web pages. CSS allows developers to separate the presentation of an HTML document from its structure. CSS code is written using selectors, properties, and values. Selectors are used to target HTML elements, while properties and values are used to style those elements.
body { background-color: #f0f0f0; font-family: Arial, sans-serif; } h1 { color: blue; font-size: 32px; text-align: center; } p { color: black; font-size: 16px; line-height: 1.5; }
HTML and CSS are essential tools for web development. HTML provides the structure and content of a web page, while CSS provides the presentation and layout. Understanding how to use these two languages together is important for creating professional and functional websites.