tutorial 3: basic functions of HTML and CSS
watch it on YouTube
Example: HTML--Basic Structure of a Page
- <!DOCTYPE html>
- <html lang="en-us">
- <head>
- <title>Webpage 01</title>
- </head>
- <body>
- <h1>This is a level 1 heading</h1>
- <p>This is a paragraph</p>
- </body>
- </html>
-
This example demonstrates the head and the body sections of an HTML page, and some basic
content that might go in each.
Example: HTML with CSS integrated
- <!DOCTYPE html>
- <html lang="en-us">
- <head>
- <title>Webpage 01</title>
- <style>
- body {
- font-family: Verdana, sans-serif;
background-color: #b8b8d1;
- }
- h1 {
-
font-size: 3em;
color: #5c3044;
- p {
- color: #5bacc2;
- }
- </style>
- </head>
- <body>
- <h1>This is a level 1 heading</h1>
- <p>This is a paragraph</p>
- </body>
- </html>
-
Here you can see how to add CSS to an HTML page. Use the HTML tag designations in your CSS to
apply style attributes to specific HTML tags.