2023-10-10 17:57:14 +00:00
|
|
|
|
|
2023-10-10 18:13:03 +00:00
|
|
|
|
### Week 3: Coding in HTML! Let's make a Website
|
2023-10-10 17:57:14 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2023-10-11 19:07:21 +00:00
|
|
|
|
Greetings from Developer land. Last week we learned what real programmers use to upload their code for others to collaborate. Using **Github.ccom**
|
2023-10-10 18:13:03 +00:00
|
|
|
|
|
|
|
|
|
|
2023-10-10 18:18:35 +00:00
|
|
|
|
|
2023-10-10 18:13:03 +00:00
|
|
|
|
|
|
|
|
|
Today we are going to start programming!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2023-10-10 18:18:35 +00:00
|
|
|
|
### Building Blocks of a Website
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
![[Pasted image 20231010141612.png]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- HTML - the content and "bones" of a website
|
|
|
|
|
- CSS - the decorations, here we can add fancy decorations
|
2023-10-11 19:07:21 +00:00
|
|
|
|
- Javascript - animations can be added here, game-making, scripting, etc..
|
2023-10-10 18:18:35 +00:00
|
|
|
|
|
|
|
|
|
---
|
2023-10-10 18:13:03 +00:00
|
|
|
|
|
2023-10-10 18:24:10 +00:00
|
|
|
|
## Step 1. Open TextEdit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Believe it or not this is all we need to actually start coding (who needs Github anyways)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Step 2. HTML Building blocks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Making the structure
|
|
|
|
|
|
|
|
|
|
There are 3 parts that tie into basic HTML structure. Think of these as the “building blocks” of a web page:
|
|
|
|
|
|
|
|
|
|
1. HTML version declaration
|
|
|
|
|
2. Heading(s)
|
|
|
|
|
3. Body
|
|
|
|
|
|
|
|
|
|
Let's start with #1.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2023-10-11 19:07:21 +00:00
|
|
|
|
### 1. HTML version declaration
|
2023-10-10 18:24:10 +00:00
|
|
|
|
Every website starts with this line of code for HTML
|
|
|
|
|
|
2023-10-10 18:30:11 +00:00
|
|
|
|
Start by typing this line in your program
|
|
|
|
|
```html
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</html>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2023-10-11 19:07:21 +00:00
|
|
|
|
### 2. Next is the Header!
|
2023-10-10 18:30:11 +00:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
</html>
|
2023-10-10 18:24:10 +00:00
|
|
|
|
```
|
2023-10-10 18:30:11 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2023-10-11 19:07:21 +00:00
|
|
|
|
### 3. Next is the Body!
|
2023-10-10 18:30:11 +00:00
|
|
|
|
|
2023-10-10 18:35:43 +00:00
|
|
|
|
```
|
2023-10-10 18:30:11 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
2023-10-11 19:07:21 +00:00
|
|
|
|
<title> This is the tile of my site!
|
|
|
|
|
</title>
|
2023-10-10 18:35:43 +00:00
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
& This is where the text of a website goes
|
2023-10-10 20:19:55 +00:00
|
|
|
|
|
|
|
|
|
<img src= " .jpg">
|
2023-10-10 18:35:43 +00:00
|
|
|
|
</body>
|
|
|
|
|
|
2023-10-10 18:30:11 +00:00
|
|
|
|
</html>
|
2023-10-10 18:35:43 +00:00
|
|
|
|
```
|
|
|
|
|
|
2023-10-10 18:30:11 +00:00
|
|
|
|
|
|
|
|
|
---
|
2023-10-10 18:35:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Save this file as hello.html file
|
|
|
|
|
|
2023-10-11 19:12:31 +00:00
|
|
|
|
& drag it to your browser window.
|
|
|
|
|
Ta-da!! You have just launched your web design...but there's only text in it
|
|
|
|
|
|
2023-10-10 18:35:43 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
2023-10-11 19:12:31 +00:00
|
|
|
|
## Give it Pizzazz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Change the background color in the `body` tag.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<body style="background-color:powderblue;">
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Change the size of the text with the `h` tags & `p` tags
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
<h1>This is a heading</h1>
|
|
|
|
|
<p>This is a paragraph.</p>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add an image from the internet with:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
<img src= "imagehere.jpg"
|
|
|
|
|
```
|
|
|
|
|
|
2023-10-11 19:20:27 +00:00
|
|
|
|
Make sure that it is a .jpg or a .png file !
|
|
|
|
|
|