Basics of HTML & CSS – Web Development
1. What is HTML?
- HyperText Markup Language: the standard language for creating web pages.
- It structures the content on the web.
2. Basic HTML Tags
- <html>, <head>, <title>: Set up a document.
- <body>: Main content.
- <h1> to <h6>: Headings.
- <p>: Paragraphs.
- <a href="URL">: Links.
- <img src="URL" alt="description">: Images.
3. What is CSS?
- Cascading Style Sheets: Used to style HTML elements.
- Controls colors, layouts, fonts, and more.
4. Basic CSS Syntax
- Selector { property: value; }
- Example: body { background-color: lightblue; }
5. Applying CSS
- Inline: <p style="color:red;">text</p>
- Internal: Within <style> tags in HTML head.
- External: Linking a .css file.
6. Example
HTML:
<html>
<head><style>p {color:blue;}</style></head>
<body><p>Hello, world!</p></body>
</html>