SlideShare a Scribd company logo
Intro to HTML/CSS
                         Class 1 Handout: HTML Exercises

1. <html>

Create a new Aptana project from the Basic Web Template called FirstProject. In your
index.html file, find the opening and closing <html> tags.




The <html> tag tells the browser that this is an HTML document. It is also the “root element”,
and is the container for all other HTML elements except the <!DOCTYPE> tag.




                                                                                                 1
2. <head> and <body>

Find the <head> and <body> opening and closing tags nested inside the <html> tags.




<head> is a container tag for all of the head elements. It must include a title element, but can
also include other information like scripts, styles, and meta information.




The <body> opening and closing tags contain all of the contents of your HTML page, such as
text, hyperlinks, images, tables, lists, etc.

Minimum required tags

These are the minimum required tags for any HTML page:

   ●   html
   ●   head
   ●   title
   ●   body

3. <title>

The title defines the title displayed in the browser’s toolbar. It also provides a title for the page
when it is added to favorites, and is displayed in search engine results. You can only have one


                                                                                                        2
<title> tag in an HTML document, and it is required. If you skip the <title> tag, your HTML will
not be valid.

Find the <title> tag in our project and change the title to:

<title>My First Project</title>




4. <h1> through <h6>

H1 through H6 are the heading tags. H1 is the “most important” heading and H6 is the least
important.

Aptana creates an <h1> tag for you with the Basic Web Template. Change the text inside the
opening and closing <h1> tags and add an <h2> tag below it.

<h1>Learning New Skills</h1>
<h2>With GDI Cincinnati!</h2>




Save the changes you just made to index.html and click on the Preview button in Aptana.




                                                                                                   3
Headings are important because Search Engines use them to index and structure the content of
your website. It’s important that you use the <h1> through <h6> tags for headings, and not to
make text larger or bolder.

5. <p>

The <p> tag defines a paragraph. Browsers will automatically add some space before and after
each <p> element. We will learn in Class 2 how to use CSS to modify that space.

Under our <h1> and <h2> tags, add a couple <p> tags with some text.

<p>Want to learn how to build your own website? Already have your own Tumblr/Wordpress/etc
site, but want to have more control over it? Interested in learning to program but want to start
small? This class is for you!</p>

<p>We will guide you through the basics of HTML and CSS, give you some readily-applicable
skills, and answer any questions you may have along the way.</p>




Save your changes to the index.html file, and look at the preview page again:




                                                                                               4
6. <br>

This is the line break tag. It inserts a single line break. This is a self closing tag, which means it
has no end tag because you already have all the information you need inside the first tag. You
may see the <br> tag a couple ways:

   ●   <br>
           ○ Used in HTML with no end tag
   ●   <br />
           ○ Used in XHTML, it must be properly closed with the forward slash. This is still a
              self closing tag, there is no additional end tag


Let’s add some line breaks in the text we used for our paragraphs:

<p>Want to learn how to build your own website?<br> Already have your own
Tumblr/Wordpress/etc site, but want to have more control over it?<br> Interested in learning to
program but want to start small? This class is for you!</p>




Now our paragraph looks like this:




                                                                                                         5
7. &nbsp;

This is the non-breaking space character entity. Browsers always remove spaces in HTML
pages. If you write 15 spaces in your text, the browser remove 14 of them before displaying the
page. To add spaces to your text that the browser won’t get rid of, use the &nbsp; character
entity. Additionally, a browser will not wrap a line of text at the point where a &nbsp; occupies.

To see the non-breaking space in action, we are going to indent the second paragraph of our
page with four spaces:

<p>&nbsp; &nbsp; &nbsp; We will guide you through the basics of HTML and CSS, give you
some readily-applicable skills, and answer any questions you may have along the way.</p>




Now you can see the indent in the preview page:




                                                                                                 6
If we used three regular spaces instead, our page would look like this:




The Aptana preview browser ignores the spaces completely.

8. Character Codes

Some characters that we might want to include in our HTML content are actually reserved for
some other use by HTML itself. For example, you couldn’t use the greater than or less than
symbol in your HTML content because the browser would mistake those symbols for the
beginning or end of a tag. Other reserved characters are quotation marks, apostrophes, and
ampersands. Character codes are also used for other symbols and characters that aren’t on a
your keyboard.


 Character     Character Code with Entity      Character Code with Entity      Description
                        Number                           Name

 “           &#34;                             &quot;                       quotation mark

 ‘           &#39;                             &apos;                       apostrophe

 &           &#38;                             &amp;                        ampersand

 <           &#60;                             &lt;                         less than

 >           &#62;                             &gt;                         greater than

 ©           &#169;                            &copy;                       copyright

 à           &#224;                            &agrave;                     small a, grave
                                                                            accent




                                                                                              7
Let’s add a few character codes to our project:

<p>&quot;I love learning about HTML and CSS!&quot; <br>-Sally Smith</p>
<p>Copyright &copy; 2012, Girl Develop It Cincinnati</p>




9. <a> and href

The <a> tag defines an anchor. It’s used to create a link to another document, by using the href
attribute. It is also used create a bookmark inside a document by using the name attribute.

The <a> tag is usually called a hyperlink, or just a link. The most important attribute is the href
attribute, because that indicates the link’s destination. By default, unvisited links appear
underlined and blue in a browser. Visited links are underlined and purple, and active links are
red. We will learn in later classes how to use CSS style these links.

Let’s add a couple links to our Aptana project:

<p><a href=”http://www.google.com”>This is a link to Google.</a><br>
   <a href=”http://twitter.com”>This is a link to Twitter.</a></p>




                                                                                                      8
This is what our links look like in the Aptana preview pane:




10. <img>

Another important tag that uses attributes is the image tag. Like the line break, this is another
self-closing tag. You will see this tag a couple ways:

   ●   <img src="http://i.istockimg.com/file_thumbview_approve/17315556/2/stock-photo-
       17315556-tabby-small-kitten-on-white-background.jpg" alt="Kitten" >
   ●   Used in HTML, no forward slash required



                                                                                                    9
●   <img src="http://i.istockimg.com/file_thumbview_approve/17315556/2/stock-photo-
       17315556-tabby-small-kitten-on-white-background.jpg" alt="Kitten" />
          ○ Used in XHTML, forward slash is required

The src attribute is pretty important. Without that, we won’t have an image display. The alt
attribute specifies alternative text for the image in the event that it cannot be displayed for some
reason, like a slow internet connection or an error in the src attribute. It is also used by screen
readers for the vision impaired, and by search eng

Let’s add an adorable kitten to our page:

<img src="http://i.istockimg.com/file_thumbview_approve/17315556/2/stock-photo-17315556-
tabby-small-kitten-on-white-background.jpg" alt="Kitten" />




                                                                                                  10
11. <ol> and <li>

The ordered list tag <ol> is used for numeric or alphabetical lists. We will learn later in the
course how to use CSS to define the type of list.

The list item tag <li> is nested inside an <ol> to add items to our list. The <li> tag is used for
both ordered lists and unordered lists.

Let’s add an ordered list to our page:

<h3>Things to Do</h3>
<ol>
      <li>Do my laundry</li>
      <li>Pay my bills</li>
      <li>Go to the bank</li>
</ol>




In our Aptana preview pane, our list should look like this:




                                                                                                     11
12. <ul> and <li>

The unordered list tag <ul> is used for unordered (bulleted) lists. As with ordered lists, we will
learn now to style unordered lists later with CSS.

The <li> tag is also used to denote list items in unordered lists. Let’s add one to our page.

<h3>More Things to Do</h3>
<ul>
      <li>Do my laundry</li>
      <li>Pay my bills</li>
      <li>Go to the bank</li>
</ul>




                                                                                                     12
We should now see a bulleted list below our ordered list in the Aptana preview pane:




13. <table>

Because HTML tables are nested elements inside a <table> tag, there are a few tags we need
to know:

   ●   <table>
           ○ A table consists of a <table> element with one or more <tr>, <th>, and <th> tags
              nested inside of it.
   ●   <tr>
           ○ This defines a table row. A <tr> contains one or more <th> or <td> elements
   ●   <th>
           ○ This defines a table header cell. Table header elements are bold and centered by
              default.
   ●   <td>
           ○ This defines a table data cell. The <td> element contains data and are regular
              and left-aligned by default.

Let’s add a table to our page:

<table>
       <tr>
               <th>Month</th>
               <th>Days</th>
       </tr>


                                                                                          13
<tr>
               <td>January</td>
               <td>31</td>
       </tr>
       <tr>
               <td>February</td>
               <td>28</td>
       </tr>
       <tr>
               <td>March</td>
               <td>31</td>
       </tr>
       <tr>
               <td>April</td>
               <td>30</td>
       </tr>
       <tr>
               <td>May</td>
               <td>31</td>
       </tr>
       <tr>
               <td>June</td>
               <td>30</td>
       </tr>
       <tr>
               <td>July</td>
               <td>31</td>
       </tr>
       <tr>
               <td>August</td>
               <td>31</td>
       </tr>
       <tr>
               <td>September</td>
               <td>30</td>
       </tr>
       <tr>
               <td>October</td>
               <td>31</td>
       </tr>
       <tr>
               <td>November</td>
               <td>30</td>
       </tr>
       <tr>
               <td>December</td>
               <td>31</td>
       </tr>
</table>




                                    14
15
In the Aptana preview pane




                             16
14. <form>

For this exercise, we are going to use Google Forms to add a form to our page.

   1.   Go to Google Forms: Create -> Forms
   2.   Enter Question Title, Help Text, Select Type, Done
   3.   More Actions -> Embed -> copy and paste code into Aptana

Copy into Aptana:

<iframe
src="https://docs.google.com/spreadsheet/embeddedform?formkey=dHB4QTNxTmNRNHJoSF
VaOENnd3VIenc6MQ" width="760" height="837" frameborder="0" marginheight="0"
marginwidth="0">Loading...</iframe>




                                                                                 17

More Related Content

What's hot

Basic data types in python
Basic data types in pythonBasic data types in python
Basic data types in python
sunilchute1
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
student
 
Strings in c++
Strings in c++Strings in c++
Strings in c++
Neeru Mittal
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
Fariz Darari
 
Collision in Hashing.pptx
Collision in Hashing.pptxCollision in Hashing.pptx
Collision in Hashing.pptx
NBACriteria2SICET
 
Arrays
ArraysArrays
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
Narayan Sau
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
Muhammad Amjad Rana
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
Huawei Technologies
 
Python revision tour i
Python revision tour iPython revision tour i
Python revision tour i
Mr. Vikram Singh Slathia
 
Compiler unit 1
Compiler unit 1Compiler unit 1
Compiler unit 1
BBDITM LUCKNOW
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
Praveen M Jigajinni
 
Python
PythonPython
Python
Shivam Gupta
 
Python programming : Standard Input and Output
Python programming : Standard Input and OutputPython programming : Standard Input and Output
Python programming : Standard Input and Output
Emertxe Information Technologies Pvt Ltd
 
Strings
StringsStrings
Strings
Nilesh Dalvi
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
vikram mahendra
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
Syed Zaid Irshad
 
Python set
Python setPython set
Python set
Mohammed Sikander
 
compiler ppt on symbol table
 compiler ppt on symbol table compiler ppt on symbol table
compiler ppt on symbol tablenadarmispapaulraj
 

What's hot (20)

Basic data types in python
Basic data types in pythonBasic data types in python
Basic data types in python
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
 
Strings in c++
Strings in c++Strings in c++
Strings in c++
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
 
Collision in Hashing.pptx
Collision in Hashing.pptxCollision in Hashing.pptx
Collision in Hashing.pptx
 
Arrays
ArraysArrays
Arrays
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
Python revision tour i
Python revision tour iPython revision tour i
Python revision tour i
 
Compiler unit 1
Compiler unit 1Compiler unit 1
Compiler unit 1
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
 
Python
PythonPython
Python
 
Python programming : Standard Input and Output
Python programming : Standard Input and OutputPython programming : Standard Input and Output
Python programming : Standard Input and Output
 
Strings
StringsStrings
Strings
 
USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2USE OF PRINT IN PYTHON PART 2
USE OF PRINT IN PYTHON PART 2
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Python set
Python setPython set
Python set
 
compiler ppt on symbol table
 compiler ppt on symbol table compiler ppt on symbol table
compiler ppt on symbol table
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 

Similar to Class 1 handout (2) html exercises

Html Workshop
Html WorkshopHtml Workshop
Html Workshop
vardanyan99
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
NextGenr
 
html complete notes
html complete noteshtml complete notes
html complete notes
onactiontv
 
html compete notes basic to advanced
html compete notes basic to advancedhtml compete notes basic to advanced
html compete notes basic to advanced
virtualworld14
 
Let me design
Let me designLet me design
Let me design
Anurag Deb
 
HTML and DHTML
HTML and DHTMLHTML and DHTML
HTML and DHTML
SURBHI SAROHA
 
(SEO) Search Engine Optimization
(SEO) Search Engine Optimization(SEO) Search Engine Optimization
(SEO) Search Engine Optimization
Digital Marketing Team Lead @ Startappz
 
HTML Tutorial
HTML TutorialHTML Tutorial
HTML Tutorial
Milecia McGregor
 
Html
HtmlHtml
Web Design Basics
Web Design BasicsWeb Design Basics
Web Design Basics
Cindy Royal
 
html.pptx
html.pptxhtml.pptx
html.pptx
developper2
 
Semantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance HtmlSemantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance Htmlsanjay2211
 
How to update HTML files
How to update HTML filesHow to update HTML files
How to update HTML files
JadeMagnet
 
Html introduction
Html introductionHtml introduction
Html introduction
vishnu murthy
 
AttributesL3.pptx
AttributesL3.pptxAttributesL3.pptx
AttributesL3.pptx
KrishRaj48
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
Shawn Calvert
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5kolev-prp
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
Coder Tech
 
Advance HTML
Advance HTMLAdvance HTML
Advance HTML
VijaySingh790398
 

Similar to Class 1 handout (2) html exercises (20)

Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
 
html complete notes
html complete noteshtml complete notes
html complete notes
 
html compete notes basic to advanced
html compete notes basic to advancedhtml compete notes basic to advanced
html compete notes basic to advanced
 
Let me design
Let me designLet me design
Let me design
 
HTML and DHTML
HTML and DHTMLHTML and DHTML
HTML and DHTML
 
(SEO) Search Engine Optimization
(SEO) Search Engine Optimization(SEO) Search Engine Optimization
(SEO) Search Engine Optimization
 
HTML Tutorial
HTML TutorialHTML Tutorial
HTML Tutorial
 
Html
HtmlHtml
Html
 
Web Design Basics
Web Design BasicsWeb Design Basics
Web Design Basics
 
html.pptx
html.pptxhtml.pptx
html.pptx
 
Html
HtmlHtml
Html
 
Semantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance HtmlSemantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance Html
 
How to update HTML files
How to update HTML filesHow to update HTML files
How to update HTML files
 
Html introduction
Html introductionHtml introduction
Html introduction
 
AttributesL3.pptx
AttributesL3.pptxAttributesL3.pptx
AttributesL3.pptx
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
 
Advance HTML
Advance HTMLAdvance HTML
Advance HTML
 

More from Erin M. Kidwell

Class 4 handout w css3 using j fiddle
Class 4 handout w css3 using j fiddleClass 4 handout w css3 using j fiddle
Class 4 handout w css3 using j fiddleErin M. Kidwell
 
Class 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designClass 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designErin M. Kidwell
 
Class 3 create an absolute layout with css abs position (aptana)
Class 3  create an absolute layout with css abs position (aptana)Class 3  create an absolute layout with css abs position (aptana)
Class 3 create an absolute layout with css abs position (aptana)Erin M. Kidwell
 
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...Erin M. Kidwell
 
Class 2 handout css exercises (2)
Class 2 handout css exercises (2)Class 2 handout css exercises (2)
Class 2 handout css exercises (2)Erin M. Kidwell
 
Class 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetClass 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetErin M. Kidwell
 
Class 1 handout (1) aptana create a new presentation and stylesheet
Class 1 handout (1) aptana  create a new presentation and stylesheetClass 1 handout (1) aptana  create a new presentation and stylesheet
Class 1 handout (1) aptana create a new presentation and stylesheetErin M. Kidwell
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Erin M. Kidwell
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Erin M. Kidwell
 

More from Erin M. Kidwell (10)

Class 4 handout w css3 using j fiddle
Class 4 handout w css3 using j fiddleClass 4 handout w css3 using j fiddle
Class 4 handout w css3 using j fiddle
 
Class 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designClass 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web design
 
Class 3 create an absolute layout with css abs position (aptana)
Class 3  create an absolute layout with css abs position (aptana)Class 3  create an absolute layout with css abs position (aptana)
Class 3 create an absolute layout with css abs position (aptana)
 
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...
 
Class 2 handout css exercises (2)
Class 2 handout css exercises (2)Class 2 handout css exercises (2)
Class 2 handout css exercises (2)
 
Class 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetClass 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheet
 
Class 1 handout (1) aptana create a new presentation and stylesheet
Class 1 handout (1) aptana  create a new presentation and stylesheetClass 1 handout (1) aptana  create a new presentation and stylesheet
Class 1 handout (1) aptana create a new presentation and stylesheet
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
 

Recently uploaded

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Class 1 handout (2) html exercises

  • 1. Intro to HTML/CSS Class 1 Handout: HTML Exercises 1. <html> Create a new Aptana project from the Basic Web Template called FirstProject. In your index.html file, find the opening and closing <html> tags. The <html> tag tells the browser that this is an HTML document. It is also the “root element”, and is the container for all other HTML elements except the <!DOCTYPE> tag. 1
  • 2. 2. <head> and <body> Find the <head> and <body> opening and closing tags nested inside the <html> tags. <head> is a container tag for all of the head elements. It must include a title element, but can also include other information like scripts, styles, and meta information. The <body> opening and closing tags contain all of the contents of your HTML page, such as text, hyperlinks, images, tables, lists, etc. Minimum required tags These are the minimum required tags for any HTML page: ● html ● head ● title ● body 3. <title> The title defines the title displayed in the browser’s toolbar. It also provides a title for the page when it is added to favorites, and is displayed in search engine results. You can only have one 2
  • 3. <title> tag in an HTML document, and it is required. If you skip the <title> tag, your HTML will not be valid. Find the <title> tag in our project and change the title to: <title>My First Project</title> 4. <h1> through <h6> H1 through H6 are the heading tags. H1 is the “most important” heading and H6 is the least important. Aptana creates an <h1> tag for you with the Basic Web Template. Change the text inside the opening and closing <h1> tags and add an <h2> tag below it. <h1>Learning New Skills</h1> <h2>With GDI Cincinnati!</h2> Save the changes you just made to index.html and click on the Preview button in Aptana. 3
  • 4. Headings are important because Search Engines use them to index and structure the content of your website. It’s important that you use the <h1> through <h6> tags for headings, and not to make text larger or bolder. 5. <p> The <p> tag defines a paragraph. Browsers will automatically add some space before and after each <p> element. We will learn in Class 2 how to use CSS to modify that space. Under our <h1> and <h2> tags, add a couple <p> tags with some text. <p>Want to learn how to build your own website? Already have your own Tumblr/Wordpress/etc site, but want to have more control over it? Interested in learning to program but want to start small? This class is for you!</p> <p>We will guide you through the basics of HTML and CSS, give you some readily-applicable skills, and answer any questions you may have along the way.</p> Save your changes to the index.html file, and look at the preview page again: 4
  • 5. 6. <br> This is the line break tag. It inserts a single line break. This is a self closing tag, which means it has no end tag because you already have all the information you need inside the first tag. You may see the <br> tag a couple ways: ● <br> ○ Used in HTML with no end tag ● <br /> ○ Used in XHTML, it must be properly closed with the forward slash. This is still a self closing tag, there is no additional end tag Let’s add some line breaks in the text we used for our paragraphs: <p>Want to learn how to build your own website?<br> Already have your own Tumblr/Wordpress/etc site, but want to have more control over it?<br> Interested in learning to program but want to start small? This class is for you!</p> Now our paragraph looks like this: 5
  • 6. 7. &nbsp; This is the non-breaking space character entity. Browsers always remove spaces in HTML pages. If you write 15 spaces in your text, the browser remove 14 of them before displaying the page. To add spaces to your text that the browser won’t get rid of, use the &nbsp; character entity. Additionally, a browser will not wrap a line of text at the point where a &nbsp; occupies. To see the non-breaking space in action, we are going to indent the second paragraph of our page with four spaces: <p>&nbsp; &nbsp; &nbsp; We will guide you through the basics of HTML and CSS, give you some readily-applicable skills, and answer any questions you may have along the way.</p> Now you can see the indent in the preview page: 6
  • 7. If we used three regular spaces instead, our page would look like this: The Aptana preview browser ignores the spaces completely. 8. Character Codes Some characters that we might want to include in our HTML content are actually reserved for some other use by HTML itself. For example, you couldn’t use the greater than or less than symbol in your HTML content because the browser would mistake those symbols for the beginning or end of a tag. Other reserved characters are quotation marks, apostrophes, and ampersands. Character codes are also used for other symbols and characters that aren’t on a your keyboard. Character Character Code with Entity Character Code with Entity Description Number Name “ &#34; &quot; quotation mark ‘ &#39; &apos; apostrophe & &#38; &amp; ampersand < &#60; &lt; less than > &#62; &gt; greater than © &#169; &copy; copyright à &#224; &agrave; small a, grave accent 7
  • 8. Let’s add a few character codes to our project: <p>&quot;I love learning about HTML and CSS!&quot; <br>-Sally Smith</p> <p>Copyright &copy; 2012, Girl Develop It Cincinnati</p> 9. <a> and href The <a> tag defines an anchor. It’s used to create a link to another document, by using the href attribute. It is also used create a bookmark inside a document by using the name attribute. The <a> tag is usually called a hyperlink, or just a link. The most important attribute is the href attribute, because that indicates the link’s destination. By default, unvisited links appear underlined and blue in a browser. Visited links are underlined and purple, and active links are red. We will learn in later classes how to use CSS style these links. Let’s add a couple links to our Aptana project: <p><a href=”http://www.google.com”>This is a link to Google.</a><br> <a href=”http://twitter.com”>This is a link to Twitter.</a></p> 8
  • 9. This is what our links look like in the Aptana preview pane: 10. <img> Another important tag that uses attributes is the image tag. Like the line break, this is another self-closing tag. You will see this tag a couple ways: ● <img src="http://i.istockimg.com/file_thumbview_approve/17315556/2/stock-photo- 17315556-tabby-small-kitten-on-white-background.jpg" alt="Kitten" > ● Used in HTML, no forward slash required 9
  • 10. <img src="http://i.istockimg.com/file_thumbview_approve/17315556/2/stock-photo- 17315556-tabby-small-kitten-on-white-background.jpg" alt="Kitten" /> ○ Used in XHTML, forward slash is required The src attribute is pretty important. Without that, we won’t have an image display. The alt attribute specifies alternative text for the image in the event that it cannot be displayed for some reason, like a slow internet connection or an error in the src attribute. It is also used by screen readers for the vision impaired, and by search eng Let’s add an adorable kitten to our page: <img src="http://i.istockimg.com/file_thumbview_approve/17315556/2/stock-photo-17315556- tabby-small-kitten-on-white-background.jpg" alt="Kitten" /> 10
  • 11. 11. <ol> and <li> The ordered list tag <ol> is used for numeric or alphabetical lists. We will learn later in the course how to use CSS to define the type of list. The list item tag <li> is nested inside an <ol> to add items to our list. The <li> tag is used for both ordered lists and unordered lists. Let’s add an ordered list to our page: <h3>Things to Do</h3> <ol> <li>Do my laundry</li> <li>Pay my bills</li> <li>Go to the bank</li> </ol> In our Aptana preview pane, our list should look like this: 11
  • 12. 12. <ul> and <li> The unordered list tag <ul> is used for unordered (bulleted) lists. As with ordered lists, we will learn now to style unordered lists later with CSS. The <li> tag is also used to denote list items in unordered lists. Let’s add one to our page. <h3>More Things to Do</h3> <ul> <li>Do my laundry</li> <li>Pay my bills</li> <li>Go to the bank</li> </ul> 12
  • 13. We should now see a bulleted list below our ordered list in the Aptana preview pane: 13. <table> Because HTML tables are nested elements inside a <table> tag, there are a few tags we need to know: ● <table> ○ A table consists of a <table> element with one or more <tr>, <th>, and <th> tags nested inside of it. ● <tr> ○ This defines a table row. A <tr> contains one or more <th> or <td> elements ● <th> ○ This defines a table header cell. Table header elements are bold and centered by default. ● <td> ○ This defines a table data cell. The <td> element contains data and are regular and left-aligned by default. Let’s add a table to our page: <table> <tr> <th>Month</th> <th>Days</th> </tr> 13
  • 14. <tr> <td>January</td> <td>31</td> </tr> <tr> <td>February</td> <td>28</td> </tr> <tr> <td>March</td> <td>31</td> </tr> <tr> <td>April</td> <td>30</td> </tr> <tr> <td>May</td> <td>31</td> </tr> <tr> <td>June</td> <td>30</td> </tr> <tr> <td>July</td> <td>31</td> </tr> <tr> <td>August</td> <td>31</td> </tr> <tr> <td>September</td> <td>30</td> </tr> <tr> <td>October</td> <td>31</td> </tr> <tr> <td>November</td> <td>30</td> </tr> <tr> <td>December</td> <td>31</td> </tr> </table> 14
  • 15. 15
  • 16. In the Aptana preview pane 16
  • 17. 14. <form> For this exercise, we are going to use Google Forms to add a form to our page. 1. Go to Google Forms: Create -> Forms 2. Enter Question Title, Help Text, Select Type, Done 3. More Actions -> Embed -> copy and paste code into Aptana Copy into Aptana: <iframe src="https://docs.google.com/spreadsheet/embeddedform?formkey=dHB4QTNxTmNRNHJoSF VaOENnd3VIenc6MQ" width="760" height="837" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe> 17