Loading
Code Nation
This is a live streamed presentation. You will automatically follow the presenter and see the slide they're currently on.
ProgTech - Web editing training 2022
Presentation: www.codenation.com/presentation
Activities: www.codenation.com/course
✓ NationBuilder Themes - Ready-made themes supporting translations into multiple languages
✓ Conservation Council of WA - Launched a beautiful action-focused website
✓ SupporterBase - Empowering volunteers to run local groups - helped Environment Vic defeat a mega-polluting gas import terminal
✓ Florida Climate Score - Interactive tool scoring politicians on climate policy
Ultimately, to become a self-sufficient digital campaigner
Add HTML structure to basic content (headings, paragraphs, links and images)
Add simple CSS styles to basic content (colours, backgrounds and spacing)
Edit code in your CMS (by editing a specific page/section)
World domination with your own robot army
HTML = HyperText Markup Language
Markup - Structure/content of the page
Hypertext - the links used to navigate between pages
It provides the raw structure of every webpage on the internet, but virtually no styles
Sections of text content are wrapped in <tags>.
This tells the browser if it's a headline, paragraph text, a link, etc.
Sections of text content are wrapped in <tags>.
This tells the browser if it's a headline, paragraph text, a link, etc.
<h1>Because of the h1 tag this would be a large headline</h1>
Notice the three components?
It's all gloriously symmetrical
In the world of HTML, multiple spaces and new lines in the code are treated the same as a single space
Paragraphs and other HTML tags provide the structure, including vertical space between elements
<a>
The anchor tag <a> has a href (the URL the text should link to)
<img />
The <img /> tag has a src (the URL where the image file is hosted
<iframe>
The <iframe> tag has a src (the URL of the page to embed)
color: black;
You can add CSS to your HTML in three ways:
<h1 style="color:blue; font-size:30px;">
<style>
* {
color: blue;
background-color: white;
}
</style>
Note: You can pick hex colours using an online picker like this one here.
color:#FFFFFF
color: rgb(255, 255, 255);
color: white;
Complete Exercise 2: www.codenation.com/exercises
Note: Use the American spelling of "color" and "center" when coding
If you are stuck ask for help (from Corey, Paddy or Sara) or sneak a glance at the answers if you need :)
.head {
color: blue;
}
<h1 class="head">
Now all HTML with the class="head" will be the colour blue!
.main {
font-size: 18px;
background: blue;
}
<tag class="main"></tag>
Note that when defining the styles the CSS class name starts with a period character (.)
<tag class=""></tag>
<style type="text/css">
.main {
font-size: 18px;
background: blue;
}
</style>
<h1 class="main">My Main Headline!</h1>
.main {
font-size: 18px;
background: blue;
}
.black-text {
color: black;
}
<h1 class="main black-text">
.main-heading {
font-size: 18px;
color: black;
}
.sub-heading {
font-size: 12px;
color: dark-grey;
}
<h1 style="font-size: 18px; color: black;">Main Heading</h1>
<h2 style="font-size: 12px; color: dark-grey;">Sub Heading</h2>
<h2 style="font-size: 12px; color: dark-grey;">Sub Heading</h2>
<h1 class="main-heading">Main Heading</h1>
<h2 class="sub-heading">Sub Heading</h2>
<h2 class="sub-heading">Another Sub Heading</h2>
h1 {
font-size: 18px;
color: blue;
}
Note that when defining these styles there is no period character (.) at the start
HTML and CSS working together!
This is where everything you've learnt today comes together!
Complete exercise 4 here: www.codenation.com/exercises