Coding lessons for Elsa
@Elsa213
huehuehue
Ahoy, are you ready to begin?
yuss
Goodie, I want to let you know I might have to disappear during this every now and again
Now then, what do you know of syntax?
Okie nerpp
So you don't know what syntax is? Alright, we will start with this - At is essential in every language, even English. I ask during this you use proper (American) English, Any stray from this and I will not teach you.
Understood?
Pfft Okay. v.v
Good. Now to start, Syntax is the structure of a language, it must be followed for it to work properly.
Before I show a example of syntax, what programming language would you like to learn? If you want to learn how to make a website - I would recommend we start with HTML
Which ever language Okay. :3
Alright. Let's begin. To show examples of code, put it in `s like this: \``` Code here \```
Why three " ` "? o:
Good question!
that is markup, \`\` is already defined for something else, so it is \``` \```
``` <div attributes>div contents</div> ``` <div> and </div> must be there, that is a example of syntax HTML syntax is usually <tag attributes>contents</tag> however for special tags it can be different.
Does that make sense?
I think so. o:
Good, now lets discuss the blank HTML template. ``` <!DOCTYPE html> <html> <head> </head> <body> </body> </html> ```
the body tag contains what will be what you see on the page, the head tag will contain stuff like stylesheets and javascript as well as meta data, more on that later. All HTML MUST be in the <html> tag Does that make sense?
Elsa?
e.e Yes.
I will be right back, i'm getting into a class
Okayy Enjoy. c:
Good, now lets move onto the different tag types: DIV, as the name suggests it divides content into different containers P, this is a paragraph tag SPAN, this is a container tag, it will contain things inline, without dividing H1, H2, and H3, these are header tags, they will style your text into a header like format STYLE, this is a tag for CSS to be SCRIPT, this is a tag for JavaScript to be FORM, this is a tag to contain a form INPUT, a input field IMG, can be used to display images IFRAME, can be used to display other web pages META, can be used to give the page metadata TITLE, to title the page LINK, to include stuff such as CSS indirectly into the page, but also adding a favicon TABLE, this tag is used for tables A, defines a hyperlink B, bolded text CENTER, to center text, however it shouldn't be used. CODE, used to display code UL, a list There are a lot more then this, but I don't want to overwhelm you.
Do I place that in a code? e.e
what?
Those are the tags for the code <div></div> <h1></h1> <p></p> and so on
Using what I've shown you so far, use the blank HTML document i provided, and put a container tag and a text tag in it, with text in the text tag
Now you confused me.. e.e
I tried ;-; Can you give me an example please? c:
Hold on, I'm in a class
Okay.
``` <!DOCTYPE html> <html> <head> </head> <body> <div> <h1>I am text</h1> </div> </body> </html> ```
now then, open a text editor and paste that into it, hit save and type "test.html" then open it in your browser, what do you see?
Nothing. e.e
What? You must be doing something wrong ._.
Did you save the file as test.html?
(and were you using notepad?)
Yes.. Javascript notepad :3
Javascript notepad? What?
What operating system are you using? Windows?
yes
open notepad
the program notepad, and save the file as test.html
I did it.. e.e
now open it in chrome
What do you see?
"I am text"
e.e
There you go!
That is your introductory lesson, all other lessons will cost 50000$
I kid, I kid! LOL
Now then, try doing one on your own :)
try creating something with HTML based on what I've shown you :) Next i'll show you how to style what you make :P
There? :3
.... Not quite.
Lemme show you a example of a web page one momment
Dang it v.v
``` <!DOCTYPE html> <html> <head> <style> #header { top:0; left:0; position:fixed; width:100%; background:#868af3; height:50px; transition:all 500ms; } #header:hover { background:#000; } #logo { position: fixed; left: 0; top: 0; width: 50px; } #header-text { font-family: Comic Sans MS; font-size:25px; color:#fff; position:fixed; top: -15px; transition:all 500ms; left: 35%; } #par1 { left: 10px; position: relative; text-indent: 15px; } #par2 { left: 10px; position: relative; text-indent: 15px; } #paragraphs { position:fixed; top: 50px; font-family:sans-serif; font-size:15px; background: #f1bdb7; width: 100%; left: 0; text-align:left; transition:all 300ms; text-shadow: 2px 2px 5px white; } #paragraphs:hover { } body { background: #f2f2f2 url('images/group-noise.png') repeat; } #footer { position:fixed; bottom:0; background:linear-gradient(#636363, #adadad); padding:8pt; left:0; width:100%; } a:link, a:visited { color: #9d0b3d; text-decoration: none; cursor: auto; transition:all 50ms; } a:link:hover, a:visited:hover { color: #9d0b87; text-decoration: none; cursor: auto; text-decoration: underline; transition:all 50ms; } a:link:active, a:visited:active { color: #0b9d22; transition:all 50ms; } #links-list { position:relative; background: #f1bdb7; font-family:sans-serif; padding: 5px; line-height: 30px; } #links-header { position:relative; background:#faaebb; height:32px } #links-header-text { font-family:sans-serif; position:relative; top:5px; font-size:20px } #links { position:fixed; left:0; top:50px; width: 200px; font-size:15px; } ul { list-style:none; } .link { position:relative; left:5px; } .bgcolor { background-color: #336600; position: relative; top: 42px; z-index: -1; } .tablebg { background-color: #FFFFFF; } .titlegreen { font-family: Arial, Helvetica, sans-serif; font-size: xx-large; font-weight: bold; color: #333300; } .lime { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #99FF00; } .chartreuse { font-family: Arial, Helvetica, sans-serif; font-size: 24px; color: #CCFF00; font-weight: bold; } .forest { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bolder; color: #006600; } .spring { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #66CC00; } .olive { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #CCCC66; } .bottlegreen { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #33CC00; } .jade { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #33CC99; } .emerald { font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #009900; } #table-assignment {} #container {} #ta-body {} #ta-head {} .ta.tr.head.text {} .ta.tr.head {} .ta.td.head {} .ta {} .tr {} .td {} table {} tr,td,th,table,thead,tbody { /*border:1px solid #000;*/ font-family:sans-serif; } td,th { outline:1px solid black; margin:0; padding:0; } </style> <link rel="icon" type="image/ico" href="images/favicon.ico"> <title>Tables Demo</title> </head> <body> <header id="header"> <a href="http://ultrilliam.com/"> <img id="logo" src="images/favicon.ico"></img> </a> <h1 id="header-text">Tables Assignment</h1> </header> <div id="container" style="position:fixed;top:50px;left:0;width:100%;"> <center> <table id="table-assignment" width="80%"> <colgroup> <col span="1" style="background:red;outline: 1px solid black;"> <col style="background:orange;"> <col style="background:yellow;"> <col style="background:white;"> </colgroup> <thead id="ta-head"> <tr> <th><p>Words</p></th> <th><p>Colors</p></th> <th><p>Numbers</p></th> <th><p>Hex</p></th> </tr> </thead> <tbody id="ta-body"> <tr> <td><p>Peanuts</p></td> <td><p>Green</p></td> <td><p>29</p></td> <td><p>#000000</p></td> </tr> <tr> <td><p>Pizza</p></td> <td><p>Blue</p></td> <td><p>125</p></td> <td><p>#ffffff</p></td> </tr> <tr> <td><p>Pineapple</p></td> <td><p>Cyan</p></td> <td><p>00</p></td> <td><p>#ff00ff</p></td> </tr> </tbody> </table> </center> </div> </div> <footer id="footer"> <a href="index.html">Go Back</a> </footer> </body> </html> ```
That is a simple example
well, actually that is more advanced, but still lol
It will give you an idea ^_^
How will that give me an idea? /.<
It will show you what to structure the HTML like, nest the tags under themselves and create something
It's confusingg. ;-;
I was afraid you would say that
I tried and retried but nope
Lemem think about another approach I could go about this
Thank you. e.e
Any luck??
I have no idea how to go about this :|
To teach her that is :|
Because I'm s p e c i a l
``` <!DOCTYPE html> <html> <head> </head> <body> <div> <h1>Testing Text</h1> </div> </body> </html> ```
``` <!DOCTYPE html> <html> <head> </head> <body> <div> <b>Test</b> </div> </body> </html> ```
@Ultrilliam Did I do it correctly? o:
Progress!
now if only it wasn't copy+paste x.x
The last one wasn't copy paste. o:
ik x'D
e.e
wow it's been one year for this
Well... I uh
Clearly failed to find a new approach
help
Join our real-time social learning platform and learn together with your friends!