Introduction to HTML CSS
Introduction to HTML CSS
What is HTML?
HTML (HyperText Markup Language) is the standard markup language used to create and design web
pages. It structures the content on the web using elements like headings, paragraphs, links, and more.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
What is CSS?
CSS (Cascading Style Sheets) is used to style and layout web pages - for example, to change fonts, colors,
spacing, etc.
Types of CSS
- Internal CSS: style is defined within a <style> tag in the HTML <head>
Introduction to Java Programming
- External CSS: style is written in a separate .css file and linked to the HTML document
CSS Syntax
selector {
property: value;
Example:
p{
color: blue;
font-size: 16px;
- <p>: Paragraph
- <img>: Image
- color
- background-color
Introduction to Java Programming
- font-size
- margin
- padding
- border