HTML (HyperText Markup Language) is the standard language for creating web pages and applications. HTML consists of a series of elements and tags that define the structure and content of a web page. HTML elements are represented by tags, which are enclosed in angle brackets (< and >).
CSS (Cascading Style Sheets) is a stylesheet language used to describe the look and formatting of a document written in HTML. CSS can control the layout and style of multiple web pages at once by defining styles for specific HTML elements. You can control font, color, spacing, and more with CSS.
Here’s an example of a simple HTML page with inline CSS styles:
<html>
<head>
<title>My First HTML Page</title>
<style>
p {
color: blue;
font-family: Arial;
font-size: 16px;
}
</style>
</head>
<body>
<p>This is a paragraph of text.</p>
<p>This is another paragraph of text.</p>
</body>
</html>
In this example, the <style>
element in the <head>
section is used to define styles for the <p>
element. The color
property sets the text color to blue, the font-family
property sets the font to Arial and the font-size
property sets the font size to 16 pixels.
There are many other CSS properties and techniques that you can use to control the look and layout of your web pages. As you gain more experience with HTML and CSS, you can create more complex and sophisticated web pages.