Computer programmers use programming languages to give instructions (code) for a computer to do.
Programming languages have commands and constraints to tell the computer what to do. One command cannot do every little thing.
Programmers must understand the set of commands a programming language allows them to do.
The programmer must use their creativity and problem-solving skills to get the computer to do what they want.
It is a lot like learning a language.
Structure and semantics of web content (aka markup) -
HTML (markup language)
Styling of fonts, headers, colors, images, links, etc. -
CSS (style sheet language)
Functionality of a webpage, such as scrolling and login -
JS (scripting language)
In software engineering, the terms "front-end" and "back-end" are distinctions which refer to the separation of concerns between a presentation layer and a data access layer respectively.
For example, if you’re using Google Chrome or Firefox, the browser is what translates all of the code in a manner for you to see and with which to interact, such as fonts, colors, drop-down menus, sliders, forms, etc.
Front-end development refers to how the user interfaces with the data and information stored by the website/application/program.
Our Phase 2 curriculum equips you with front-end development skills.
Let's use Developer Tools.
How does the browser access the house?
GET request to the server
Where do we put the house on the web for others to access?
Hosting service
How do we store info the user has submitted to the house?
Database
Enter databases to the rescue!
Databases store, organize, and retrieve a website or application’s data.
Databases make up the backend.
Did you know?
Data is now the most valuable commodity on the planet, even more valuable than oil.
The back-end enables the browser to show
the front-end "house."
The back-end holds the information and helps with all of the technical pieces that help make a website function.
Types of back-end languages:
The back-end has three parts to it:
A server is a computer that fulfills client requests.
An application creates, deletes, changes, renames, etc., information.
A database stores such information.
If the kitchen is the server and the fridge is the database, then the _____ is the web application.
The Chef is the web application, because they do all of the tasks and create the food with the algorithms that they are programmed to make (aka business logic) with the food (aka data).
Everything that a customer sees on the webpage is the front-end.
Once that customer enters all of her information, such as name, billing address, destination, etc.,
the web application stores the information in a database that was created previously on the server in which the website is calling for information.
That is all back-end.
The web application creates, deletes, changes, renames, etc., items in the database.
A server, in the simplest form, is a computer accessed remotely that runs software to fulfill requests from clients.
It is the only language on both
the front-end and the back-end!
Lots of great libraries and frameworks!
What is the difference between front-end and back-end?
What is the difference between a markup language and a programming language?
What are the three languages used on the front-end?
What is the one language that can be read by the browser on the front-end and the back-end?
Read Introduction in Textbook
Sign up for an account at Codecademy. Complete the Introduction to HTML course by the end of this unit.
HTML is the code that tells browsers to display the parts of the website that users see on their screens.
images * text * videos
Concrete example:
<p>This is the content of my paragraph</p>
This is the content of my paragraph.
If you 'view the source', you see this:
<tagname>Stuff in the middle</tagname>
<p> This is a sample paragraph.</p>
Tag Name | Opening and Closing Tag(s) |
---|---|
Paragraph | <p> </p> |
Heading | <h1> </h1> |
Image | <img /> |
Anchor | <a> </a> |
List | <ul> </ul> |
For us to write or modify code, we will need to download a Text Editor. We use Visual Studio Code (VS Code).
These instructions will help with download, setup, and creating a project folder!
IDE stands for Integrated Development Environment.
This is a fancy way of saying that your text editor has a lot of tools (e.g., running code, debugging) that makes it easier to write code well!
Guess what VS Code is?😊 Yes, VS Code is an IDE.🎉
Let's see what an IDE can do!
Your browser will look for an index.html file first!
You can create a new file in your root folder in VS Code:
Congrats! You just created your index.html file!
The first thing on an HTML page is the doctype, which tells the browser which version of the markup language the page is using.
HTML 4.01 strict doctype declaration:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
HTML 5 and beyond doctype declaration:
<!DOCTYPE html>
* The doctype is case-insensitive.
DOCtype, doctype, DocType and DoCtYpe are all valid.
After <doctype>, the page content must be contained between <html> tags.
<!DOCTYPE html>
<html>
</html>
Head: The head tag contains the title of the page & meta information about the page. Meta information is not visible to the user, but has many purposes, like providing information to search engines.
Body: The body tag contains the actual content of the page. Everything that is contained in the body is visible to the user.
<!DOCTYPE html>
<html>
<head>
<title>Title of the page appears in the tab.</title>
</head>
<body>
The page content here displays in the browser window.
</body>
</html>
Let's review page 27:
Headings and Opening a File in Your Browser
In addition to VS Code, we will use online code editors to test snippets of code. In this training, we may use:
Each site permits users with accounts to save these snippets and access settings, such as text wrap. We will use Github for the signup/signin process.
See next slide for instructions.
Click here to get started!
Click here to edit your JS Bin Settings.
All elements "nest" inside one another.
Nesting is when you put containing tags inside other containing tags.
<body>
<p>I am now a paragraph tag nested inside the body tag.</p>
</body>
Try it! Nest a heading inside the body tag.
Whichever element OPENS first
CLOSES last
Which Owl Am I?
<html>
<head>
<title>I am a title. Which owl am I?</title>
</head>
<body>
<h1>I am a heading. Which owl am I?</h1>
<p>I am a paragraph. Which owl am I?</p>
<ol>I am an ordered list. Which owl am I?
<li>I am a list item. Which owl am I?</li>
<li>I am a list item. Which owl am I?</li>
<ul>I am an unordered list. Which owl am I?
<li>I am a list item. Which owl am I?</li>
<li>I am a list item. Which owl am I?</li>
</ul>
</ol>
</body>
</html>
Elements are 'nested' inside the <body> tag.
<body>
<p>A paragraph inside the body tag</p>
</body>
Paragraphs 'nested' inside list items.
<ul>
<li>
<p>A paragraph inside a list item</p>
</li>
</ul>
<br/>
<img/>
Read Chapter 1 in Textbook
Paragraph tags contain text often found in the body of the document.
On this slide, can you guess which text is contained in a paragraph tag?
<p>Paragraph tags contain text often found in the body of the document.</p>
<p>On this slide, can you guess which text is contained in a paragraph tag?</p>
White space makes code readable for programmers.
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
* White space is only for humans. You can write your code with any spacing. Guess how the above code shows up in the browser?
Paragraph 1
Paragraph 2
Paragraph 3
Paragraphs allow you to format your content in a readable fashion.
* You can edit how paragraphs are displayed with CSS
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
* Heading number indicates hierarchy, not size. Think of outlines from high school papers.
Page 43 in the Textbook
Although some text elements do not affect the structure of your web pages, they DO add extra information to the pages.
These text elements are known as semantic markup.
Let's identify each one on a webpage!
<p>
This paragraph has <em>Emphasized</em> text and <strong>Important</strong> text.
</p>
This paragraph has Emphasized text and Important text.
* Notice: em and strong are meant to indicate meaning through style.
For italicized text in appearance sans meaning, use CSS.
Read Chapter 2 in Textbook
<ul>
<li>List Item</li>
<li>Another List Item</li>
</ul>
<ol>
<li>List Item</li>
<li>Another List Item</li>
</ol>
Unordered list (bullets)
Ordered list (sequence)
<ul>
<li>January</li>
<li>February</li>
</ul>
<ol>
<li>Wake up.</li>
<li>Brush teeth.</li>
</ol>
Unordered list (bullets)
Ordered list (sequence)
Ordered List: Top 100 Sites Visited
Unordered List: Bucket List Ideas
App: To Do List App
See how often lists are used in web design? 😁Lists can be used to organize any list of items.
Let's make a list of the New York Times Books from your Google Docs.
Imagine a file that has thousands of lines of code.
How do we break it up to be more readable?
You can add comments to your code that will not be seen by the browser, but only visible when viewing the code.
<!-- Comment goes here -->
Comments help organize your code into sections so you (or someone else) can easily understand your code. You can also 'comment out' large chunks of code to hide it from the browser.
<!-- Beginning of header -->
<div id="header">Header Content </div>
<!-- End of header -->
<!-- Beginning of comment block
<ol>
<li>List Item</li>
<li>Another List Item</li>
</ol>
End of comment block -->
Chapter 3
How does a link in your browser know where to show up in the code?
Links are "anchored" to the item that you want users to be able to click on.
Anchor tags <a> make the above clickable. So what kind of element is an anchor tag -- container or empty?
<a> </a>
Opening tags can give us more information about an element.
<button disabled>Submit</button>
Example: Anchor Tag Scavenger Hunt
<a href="https://anniecannons.com">AnnieCannons</a>
Links have three components
<a href="https://anniecannons.com">AnnieCannons</a>
The <a> tag surrounds text or images or other HTML elements to turn them into links.
The awesome thing about VS Code...is that it autofills for you. Let's try it! 💪
Links can have attributes that tell the link to do different actions like open in a new tab...
<a href="home.html" target="_blank">Link Text</a>
Link opens in a new window/tab with target="_blank"
...or launch your e-mail program.
<a href="mailto:info@anniecannons.com">E-mail us!</a>
Adding mailto: directly before the email address means the link will open in the default email program.
What else can a link tag do? Let's GTS - Google That Stuff!
Chapter 4 in your textbook
Page 82: Let's play "Find That Relative!"
Question: If I am in my index.html file and want to insert an image into the body element, how do I find the img folder to select the cute-panda.jpg image file?
<body>
<img src="?" alt="Cute Panda" />
</body>
Congratulations! You found a sibling's child. 👶
The path you just made to get from index.html to cute-panda.jpg is a relative path because these paths change (read: are "relative"). These files also happen to be relatives in the ac-directory-structure folder.
Images have three components
<img src="https://www.publicdomainpictures.net/pictures/360000/velka/panda-in-chiangmai-zoo-thailand-1594485630URd.jpg"
alt="Cute Panda"/>
* Notice: This tag is our first example of an empty or standalone or "self-closing" element.
"filename.jpg"
"img/filename.jpg"
"http://www.anniecannons.com/volunteers"
Page 109 in Textbook
Click here for information on new types of images.
<p>
Hello <br/>
It's me <br/>
I was wondering if after all these years you'd like to meet <br/>
</p>
Hello
It's me
I was wondering if after all these years you'd like to meet
Chapter 5
Can you think of websites that use tables? Let's GTS!
Tables represent information in a grid format.
Tables are made up of rows and columns.
<table>
<tr>
<th>Head</th>
<th>Head</th>
<th>Head</th>
</tr>
<tr>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
</table>
Head | Head | Head |
---|---|---|
Data | Data | Data |
How would you add another row of Data to the above table?
Tables can be styled with CSS to add zebra striping or to highlight important rows/columns.
Page 131
Make this table. Take a screenshot of your code in VSC.
Chapter 6
Can you think of websites that use forms? Let's GTS!
Forms allow us to collect information from our users.
Adding Dates
Adding Colors
Uploading Files
Page 148
Download the HTML file here.
Fill in the sections where there are directions in the comments.
By the end of the class, you will have built a simple site using HTML and constructed a login form.
Imagine a huge file of code that makes up a website.
How do you break it up?
Imagine several lines of text:
Veggies es bonus vobis, proinde vos postulo
Essum magis kohlrabi welsh onion daikon lettuce.
Amaranth tatsoi tomatillo melon azuki bean garlic.
How do we use HTML to help change the color of only one word (e.g., kohlrabi) and not the whole paragraph?
Veggies es bonus vobis, proinde vos postulo
Essum magis kohlrabi welsh onion daikon lettuce.
Amaranth tatsoi tomatillo melon azuki bean garlic.
Page 187
What do you notice about the code below?
<p class="anniecannons">We are learning awesome coding skills.</p>
<p class="anniecannons">We are going to start CSS soon!</p>
<p id="coach">Where's my treat?</p>
Classes and IDs help us categorize HTML elements
for ease of styling in CSS.
Choose the best word: HTML is for content/presentation while CSS is for content/presentation.
CSS Unit Preview for the above code.
Chapter 8 + Chapter 9 sans Flash
(Pages 212, 213, 216, 217, 220-222, 224, 226-228)
Create an HTML website with the following features:
Thank you for your attention!