MTA Programming HTML CSS 98-383 Student Workbook
MTA Programming HTML CSS 98-383 Student Workbook
world-wide. With dynamic video-based courseware and effective learning management systems, LearnKey provides expert
instruction for popular computer software, technical certifications, and application development. LearnKey delivers interactive
courses online. For a complete list of courses visit:
http://www.learnkey.com/
All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means now known or to
be invented, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system
without written permission from the author or publisher, except for the brief inclusion of quotations in a review.
© 2018 LearnKey
www.learnkey.com
374331
Table of Contents
Using This Workbook_____________________________________________________________________5
Best Practices Using LearnKey’s Online Training__________________________________________________6
Skills Assessment________________________________________________________________________7
MTA Introduction to Programming Using HTML and CSS (98-383) Time Tables___________________________8
Session 1
Fill-in-the-Blanks Session 1________________________________________________________________10
Script and Noscript Tags__________________________________________________________________11
Link and Meta Tags______________________________________________________________________12
HTML Fundamentals ____________________________________________________________________13
Session 2
Fill-in-the-Blanks Session 2________________________________________________________________15
HTML Tables__________________________________________________________________________17
HTML Headings, Paragraphs, and Line Breaks___________________________________________________ 18
Hr, Div, and Span Tags____________________________________________________________________19
HTML List Tags________________________________________________________________________20
Semantic Tags _________________________________________________________________________21
Details and Summary Tags_________________________________________________________________22
Figure and Caption Tags__________________________________________________________________23
Image Links___________________________________________________________________________24
Hyperlinks____________________________________________________________________________25
Bookmarks___________________________________________________________________________26
Relative and Absolute Links_______________________________________________________________27
Navigating Folder Hierarchies______________________________________________________________28
Action and Method Attributes_____________________________________________________________29
Accessibility___________________________________________________________________________30
Input Types and Labels___________________________________________________________________31
The Select Tag_________________________________________________________________________32
Textarea Tag___________________________________________________________________________33
Button Tags___________________________________________________________________________34
Output Tags___________________________________________________________________________35
Option Tag____________________________________________________________________________36
Datalist______________________________________________________________________________37
Fieldset and Legend Tags__________________________________________________________________38
Session 3
Fill-in-the-Blanks Session 3________________________________________________________________40
Add Images___________________________________________________________________________41
Image Layouts and Links__________________________________________________________________42
SVG and Canvas Tags____________________________________________________________________43
Video and Source Tags___________________________________________________________________44
Audio and Track Tags____________________________________________________________________45
Simple Iframe Implementations_____________________________________________________________46
Session 4
Fill-in-the-Blanks Session 4____________________________________________________________________48
Creating Style Sheets________________________________________________________________________49
Style Sheet Precedence______________________________________________________________________50
Valid Syntax for Rule Sets_____________________________________________________________________51
Apply Classes_____________________________________________________________________________52
Apply ids_________________________________________________________________________________53
Apply Pseudo Classes________________________________________________________________________54
Reusing Rules and Rule Sets___________________________________________________________________55
CSS Comments____________________________________________________________________________56
Multiple Browser Tests and Web Safe Fonts________________________________________________________57
Session 5
Fill-in-the-Blanks Session 5____________________________________________________________________59
Height and Max-Width Used with an Element______________________________________________________61
Float Positioning___________________________________________________________________________62
Relative and Absolute Positioning_______________________________________________________________63
Overflow and Alignment Settings_______________________________________________________________64
Inline vs. Block ____________________________________________________________________________65
Visibility_________________________________________________________________________________66
Box Model Margins and Padding________________________________________________________________67
Font Families in CSS_________________________________________________________________________68
Font Colors in CSS_________________________________________________________________________69
Font Styles and Weights in CSS_________________________________________________________________70
Link Colors in CSS__________________________________________________________________________71
Text Alignment and Decoration________________________________________________________________72
Indentation _______________________________________________________________________________73
Border Color and Style______________________________________________________________________74
Border Width_____________________________________________________________________________75
Backgrounds______________________________________________________________________________76
Divs and Colors____________________________________________________________________________77
Units of Measure___________________________________________________________________________78
Viewport and Media Query Settings_____________________________________________________________79
Percentages and Pixels_______________________________________________________________________80
Frameworks, Templates, and Max Width___________________________________________________________81
Appendix
Introduction to Programming Using HTML and CSS (98-383) Suggested Study Plan ��������������������������83
Introduction to Programming Using HTML and CSS (98-383) Session 1 Outline ����������������������������93
Introduction to Programming Using HTML and CSS (98-383) Session 2 Outline ����������������������������94
Introduction to Programming Using HTML and CSS (98-383) Session 3 Outline ����������������������������95
Introduction to Programming Using HTML and CSS (98-383) Session 4 Outline ����������������������������96
Introduction to Programming Using HTML and CSS (98-383) Session 5 Outline ����������������������������97
Using This Workbook
This project workbook contains practice projects and exercises to reinforce the knowledge you have gained through the
video portion of the MTA Introduction to Programming Using HTML and CSS course. The purpose of this workbook is
twofold. First, to get you further prepared to pass the MTA 98-383 exam. Secondly, to get you job-ready skills and increase
your employability in the area of web application development in HTML5 and CSS.
This project workbook is versatile in that the projects follow the order of the video portion of this course.You can
complete the workbook exercises as you go through each section of the course, complete several of these at the end of
each session, or complete them after viewing the entire course. The key is to go through these projects as they will help
strengthen and solidify your knowledge of this course.
Each project is mapped to a specific video (or videos) in the course and specific test objectives. The materials you will need
for this course include:
• A web design tool. This course uses Visual Studio Community, a free design tool available at
https://www.visualstudio.com. However, any web design/HTML Editor tool will work. In order to preview certain
functionality properly, the web editor needs to be able to preview webpages in a mock web server.Visual Studio
does this. Notepad does not.
• The practice files for these projects, which are available at https://media-onlineexpert.akamaized.net/files/MTA_
Introduction_to_Programming_Using_HTML_and_CSS_(98-383)_Support_Files.zip
• One or more web browsers to use to test your webpages. The course uses Microsoft Edge, but you should use at
least two browers (Google Chrome, Firefox, Safari, Internet Explorer) for best testing results.
Benefits:
• Learning HTML and CSS, with an emphasis on new tags for HTML5.
• View your online courseware anytime and anywhere.
• Put your skills to the test with dozens of Pre/Post test questions and practice labs.
5| MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Best Practices Using LearnKey’s Online Training
LearnKey offers video-based training solutions which are flexible enough to accommodate the private student, as well as
educational facilities and organizations.
Our course content is presented by top experts in their respective fields and provides clear and comprehensive information.
The full line of LearnKey products has been extensively reviewed to meet superior standards of quality. The content in our
courses has also been endorsed by organizations, such as Certiport, CompTIA®, Cisco, and Microsoft. However, it is the
testimonials given by countless satisfied customers that truly set us apart as leaders in the information training world.
LearnKey experts are highly qualified professionals who offer years of job and project experience in their subjects. Each
expert has been certified in the highest level available for their field of expertise. This provides the student with the
knowledge necessary to also obtain top-level certifications in the field of their choice.
Our accomplished instructors have a rich understanding of the content they present. Effective teaching encompasses not
only presenting the basic principles of a subject, but understanding and appreciating organization, real-world application, and
links to other related disciplines. Each instructor represents the collective wisdom of their field and within our industry.
We ensure that the subject matter is up-to-date and relevant. We examine the needs of each student and create training
that is both interesting and effective. LearnKey training provides auditory, visual, and kinesthetic learning materials to fit
diverse learning styles. The following are three levels of implementation:
Pre-assessment: The pre-assessment is used to determine the student’s prior knowledge of the subject matter. It
will also identify a student’s strengths and weaknesses, allowing the student to focus on the specific subject matter
he/she needs to improve most. Students should not necessarily expect a passing score on the pre-assessment as it is
a test of prior knowledge.
Video training session: Each course of training is divided into sessions that are approximately two hours in
length. Each session is divided into topics and Subtopic. As this is a test prep course, there is only one session in this course.
Practice Labs: In addition to the video training, there are practice labs available for students to use to reinforce the skills
learned in the video training portion of the course.
Post test: The post test is used to determine the student’s knowledge gained from interacting with the training. In
taking the post test, students should not consult the training or any other materials. A passing score is 80 percent
or higher. If the individual does not pass the post test the first time it is taken, LearnKey would recommend the
incorporation of external resources, such as the workbook and additional customized instructional material.
6| MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Skills Assessment
Instructions: Rate your skills on the following tasks from 1-5 (1 being needs improvement, 5 being excellent).
Skills 1 2 3 4 5
Construct markup that uses metadata elements.
Describe the appropriate use of the img, svg, and canvas elements.
7| MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
MTA Introduction to Programming Using HTML
and CSS (98-383) Time Tables
Session 1 Actual Time Session 2 Actual Time
Introduction 00:03:00 Structure Content Through Markup 00:17:21
Markup with Metadata 00:09:18 Semantic HTML Elements 00:10:01
Well-Formed Markup 00:11:38 Navigation Elements 00:12:10
Total Time 00:23:56 Form Elements 00:24:05
Total Time 01:03:37
8| MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 1
Fill-in-the-Blanks Session 1
Instructions: While watching Session 1, fill in the missing words according to the information presented by the instructor.
[References where answers are found are in brackets.]
2. The noscript tag lets a user know that the browser used does not support the in the script tag
code. [Noscript Tag]
Well-Formed Markup
5. Besides HTML5, other DOCTYPES you may find on a webpage are HTML 4, 4.0.1 or .
[DOCTYPE Declaration and Html Tag]
6. The two most common pieces of information in the head tag, besides meta information, are scripts and
. [Head Tag]
8. A /> symbol at the end of a tag indicates a tag to where the closing portion does not need to be
. [Closing Tags]
9. Entities are pieces of HTML code which display and characters. [Entities]
10. The opening and closing tags for an HTML comment are and .
[Comments]
10 | Session 1 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Script and Noscript Tags Project Details
Script tags are tags which hold programming code in a language other than HTML,
usually JavaScript. These are often found in the body of an HTML document but can be Project Files:
in the head section if the script is meant to take action on a webpage but not display the 11a-scripts.html
information contained in the script.
Estimated Completion
The noscript tag is used to display text that will show if the browser being used to Time:
display a webpage does not support the scripting language used within a script tag. 10 Minutes
11 | Session 1 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Link and Meta Tags Project Details
Link tags are used to link HTML files to files such as style sheets (CSS files) and script
files such as JavaScript files. The link tag is not used for hyperlinks. The anchor tag (A tag) Project Files:
11c-scripts.html
is used for hyperlinks.
Estimated Completion
Part of proper HTML markup in a document is using metadata, which is often described
as data defining data. Meta tags have four functions: define character types, define Time:
webpage content, define how the webpage is viewed, and indicate if the language used 10 Minutes
for the page can be translated. Meta tags, as they do not display on the webpage itself,
are always listed in the head section of a webpage. Video Reference:
Session 1
Purpose: Topic: Markup with Metadata
Subtopic: Link Tag; Meta Tags
Upon completing this project, you will be able to add link tags and meta tags to an
HTML document.
Objectives Covered:
1 Understand HTML Fundamentals
Steps for Completion:
1.1 Construct markup that uses
1. Open the 11c-scripts.html file in the MusicStore1 student folder in your code metadata elements
editor. 1.1.c Link
2. On the line below the title tag, add a link tag that links to a stylesheet named 1.1.d Meta tags (encoding,
test.css keywords, viewport, translate)
3. On the line below the opening head tag, add a meta tag to define the charset as
utf-8
4. On the next line, define a meta tag that uses the keywords music, store, and
instruments
5. On the next line, define a meta tag for the viewport with the width set to the
device width and the initial scale set to 1.0
6. On the next line, define a meta tag that will not allow translation through Google.
7. Save your changes.
8. Preview your webpage.You should see a light green background (due to the style
sheet) and a message indicating that either the browser supports JavaScript or it
does not.
9. Close your browser.
10. Close your open files in your code editor, saving changes if prompted.
12 | Session 1 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
HTML Fundamentals Project Details
HTML documents have four areas, the DOCTYPE, HTML, head, and body. The
DOCTYPE indicates the type of document. The HTML area opens and closes the
Project Files:
N/A
document’s code. The head contains titles, links, and meta tags that do not need to show
on the webpage. The title is the name of your webpage and is used by search engines.
The body contains the elements that will be visible on the webpage. All four areas of Estimated Completion
an HTML document have opening and closing syntax vital to the functionality of the Time:
document. 10-15 Minutes
Regarding symbols and comments, symbols are HTML entities that start with an Video Reference:
ampersand and end with a semicolon. For example, © is an entity that represents a Session 1
copyright. Comments start with a <!-- and end with a -->. Webpages ignore text inside Topic: Well-Formed Markup
comments. The comments often serve as explanations of parts of a webpage, notes to a Subtopic: DOCTYPE Declaration
and Html Tag; Head Tag; Body Tag;
fellow developer, or perhaps placeholders for future text.
Closing Tags; Entities; Comments
13 | Session 1 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 2
14 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Fill-in-the-Blanks Session 2
Instructions: While watching Session 2, fill in the missing words according to the information presented by the instructor.
[References where answers are found are in brackets.]
5. The hr tag provides a used to help break up sections of a webpage. [Hr Tag]
6. To define and format block level elements, use a tag. Use the tag to
define and format inline elements [Span Tag]
10. The Nav tag is used to help spot navigation on webpages. [Nav Tag]
13. A footer tag helps one be consistent with content at the area of a webpage. [Footer Tag]
14. A tag surrounds a . tag, which contains content that can be hidden
or shown at will. [Detail and Summary Tags]
15. A figure tag is used in conjunction with a tag to line up a caption with an image. [Figure Tag]
16. A caption tag is usually used on rather than on images. [Caption Tag]
Navigation Elements
17. Images should have text to display in case an image does not render properly. [Image Links]
19. By setting the target property of a hyperlink to , the browser is instructed to open that link in a
new tab or window. [Targets]
20. Bookmarks allow one to navigate to specific within a webpage, often a longer webpage.
[Bookmarks]
15 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
21. A link points to a file or page within a website, while an link points
to a page on a different website. [Relative vs. Absolute Links]
22. To indicate that a link is in a folder above the current folder in a hierarchical path, two are
needed in the code for the link. [Folder Hierarchy Navigation]
Form Elements
23. A form element’s attribute directs a browser on how to send form data to a server or retrieve
data from a server, while its attribute indicates which URL form data is sent to upon submission.
[Action and Method Attributes]
24. A request takes submitted data and inserts it into a database, while a
request modifies data on a server through user input. [Submission Methods]
25. The attribute allows one to use a tab key to navigate through form fields. [Accessibility]
27. The textarea tag allows one to add a field with multiple of text to a form. [Textarea Tag]
28. The input tag is generally used instead of a button tag when one is trying to use a button to or
reset a form. [Button Tag]
29. The output tag allows for displaying a calculation depending upon what one into a form. [Output
Tag]
30. tags help to group option tags and make them more readable. [Option Tag]
31. A datalist tag is used to pre- a list of values into a form field. [Datalist Tag]
16 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
HTML Tables Project Details
Tables are used to organize information in rows and columns. Tables used to be used
to lay out entire pages (and they still do, sometimes), but with the advancements in
Project Files:
31a-hours.html
Cascading Style Sheets (CSS) for layouts for overall pages, tables are best served for
31a-hours2.html
grid-like information.
Estimated Completion
For the purpose of creating tables, the table tag creates the table, the tr tag indicates a
table row, and the td tag indicates a table cell.
Time:
10 Minutes
Purpose:
Video Reference:
Upon completing this project, you will be able to create a table and use different Session 2
attributes to style the table. Topic: Structure Content Through
Markup
Steps for Completion: Subtopic: Table Tags;Table Attributes
1. Open the 31a-hours.html file from your MusicStore2 student folder.
2. Add a table below the text, Hours of operation. The table should have five rows and Objectives Covered:
two columns. 3. Structure Documents Using HTML
3. Save your changes. 3.1 Construct and analyze markup to
structure content and organize data
4. Open the 31a-hours2.html file from your MusicStore2 student folder. 3.1.a Table tags
5. Add a 1-point border to the table.
6. Change the first row from being a normal table row to that of a table header.
7. Change the last row to the table to contain just one column instead of two.
8. Save your changes.
9. Preview the webpage in a browser.Your table should look like this:
17 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
HTML Headings, Paragraphs, and Project Details
18 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Hr, Div, and Span Tags Project Details
Once the basic strucutre of an HTML document is in place, you will want to organize
and separate content further. One way to do this is to add horizontal rules (Hr tags) in Project Files:
31e-index.html
between sections of a webpage.
Estimated Completion
Two other options available are Div and Span tags. A Div tag isolates a block of text and
allows for formatting specifically on that block. A Span tag allows for inline formatting Time:
around text within a paragraph, but does not isolate the text from a paragraph. 10 Minutes
19 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
HTML List Tags Project Details
An unordered list (Ul tag) is a bulleted list that does not require steps to be done in any
specific order, while an ordered list (Ol tag), in most cases, is a numbered list with steps
Project Files:
31h-Index.html
that must be done in a specific order.
Estimated Completion
Both unordered and ordered lists contain list item tags (Li tags), which serve as bullet
points for unordered lists and numbered items for ordered lists.
Time:
15 Minutes
Purpose:
Video Reference:
Upon completing this project, you will be able to create unordered and ordered lists. Session 2
Topic: Structure Content Through
Steps for Completion: Markup
1. Open the 31h-index.html file from the MusicStore2 student folder. Subtopic: Ul and Li Tags; Ol and Li
Tags
2. Turn the items Guitar, Piano, and Drums into an unordered list.
3. Create a list item for each instrument in the list.
Objectives Covered:
4. Change the bullet created by the unordered list to a square style. 3 Structure Documents Using HTML
5. Preview the webpage in a browser.You should see a square bulleted list of 3.1 Construct and analyze markup to
instruments. structure content and organize data
6. Return to your code window. 3.1.h UI tag
7. Add an ordered list opening tag before the text, Join our music club, found below 3.1.i Ol tag
the list of instruments you just created. 3.1.j Li tag
8. Close the ordered list after the text, Sign up for a course.
9. Make each listed step its own item within the ordered list.
10. Make the ordered list show the steps as capital letters.
11. Save your changes.
12. Preview the webpage in a web browser.Your page should resemble this:
13. Close all open files, both in your browser and your code editor.
20 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Semantic Tags Project Details
A semantic tag is used to organize a webpage. Semantic tags are a quick reference to let
both developers and search engines know where the header, navigation, text sections,
Project Files:
32a-spotlight.html
articles with self-containing text, aside story, and footer areas are in an HTML document.
Estimated Completion
Semantic tags do not format content directly. Any formatting on semantic tags is done
through Cascading Style Sheets (CSS).
Time:
15 Minutes
Purpose:
Video Reference:
Upon completing this project, you will know what semantic tags are used for and where Session2
to use them in an HTML document. Topic: Semantic HTML Elements
Subtopic: Header Tag: Nav Tag;
Steps for Completion: Section Tag; Article and Aside Tags,
1. Open the 32a-spotlight.html file in the MusicStore2 student folder. Footer Tag
21 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Details and Summary Tags Project Details
Two semantic tags that actually have some interaction of supported web browsers are
the details and summary tags. A details tag, wrapped around an area of text, makes the Project Files:
32g-books.html
area expandable and collapsible. A summary tag, contained within a details tag, should be
wrapped around the text to show for the expandable and collapsible area.
Estimated Completion
Purpose: Time:
Upon completing this project, you will know how to use the details and summary tags in 5-10 Minutes
an HTML document.
Video Reference:
Steps for Completion: Session 2
Topic: Semantic HTML Elements
1. Open the 32g-books.html file in the MusicStore2 student folder.
Subtopic: Details and Summary Tags
2. Add an opening details tag above the paragraph with the text, Look at all of these
great books!
Objectives Covered:
3. Close the details tag after the image tag for the sheet music image. 3 Structure Documents Using HTML
4. On the line after the opening details tag (and before the next paragraph tag), add 3.2 Construct and analyze markup that
the text, Show or hide these books uses HTML5 semantic elements
5. Add an opening and closing summary tag around the text you just typed. 3.2.g Details tag
6. Save your changes. 3.2.h Summary tag
7. Preview the webpage in a web browser.You should be able to expand and contract
the section for showing and hiding books.
22 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Figure and Caption Tags Project Details
A figure tag is used in conjunction with the figcaption tag to mark up an image on a
webpage. The figcaption tag allows for adding a caption to an image and for lining up the Project Files:
32i-spotlight.html
caption with the image.
32j-hours2.html
The caption tag is used on tables. This allows one to place description text for a table in
Estimated Completion
close proximity with a table.
Time:
15 Minutes
Purpose:
Upon completing this project, you will know how to use the figure, figcaption, and
caption tags in an HTML document.
Video Reference:
Session 2
Topic: Semantic HTML Elements
Steps for Completion: Subtopic: Figure Tag; Caption Tag
1. Open the 32i-spotlight.html file in the MusicStore2 student folder.
2. Add a figure tag above the image of the Kazoo. Objectives Covered:
3. Close the figure tag after the image. 3. Structure Documents Using HTML
4. On the line after the image, add an opening and closing figcaption tag. 3.2 Construct and analyze markup that
uses HTML5 semantic elements
5. Within the figcaption tag, add the text, The Mighty Kazoos
3.2.i Figure tag
6. Save your changes. 3.2.j Caption tag
7. Preview your webpage in a web broswer.You should see a caption below the image.
8. Return to your code editor.
9. Open the 32j-hours2.html file in the MusicStore2 student folder.
10. Add the text, Current Summer Hours in between the opening table tag and the
first tr tag.
11. Surround the text you just added with an opening and closing caption tag.
12. Surround the text, Hours of operation, with an opening and closing H2 tag.
13. Save your changes.
14. Preview the webpage in a browser.You should see the following:
15. Close all open files in both your browser and your code editor.
23 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Image Links Project Details
Elements, such as images, are not embedded within a webpage. They are linked from an
external source to a webpage. With images, the img tag is used to indicate an image on Project Files:
33a-books.html
a webpage and the source (src) attribute is used to define the location of the image.
If this image is in the same folder as the page itself, the file name is all that is needed.
Otherwise, the path to the file needs to be defined. For example, if the image is on the Estimated Completion
same website but in an images folder adjacent to the file, the path needs to have the Time:
folder name, a backslash, and then the file. 5-10 Minutes
24 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Hyperlinks Project Details
A hyperlink will move the user to another webpage when it is clicked. A hyperlink can be
internal or external to a website. A target can control how a hyperlink opens, with the
Project Files:
33b-index.html
most common example being of a target set to _blank so that the hyperlink can open in
33b-spotlight.html
a blank browser tab. Hyperlinks are created using the anchor (a) tag and the hyperlink
reference (href) attribute.
Estimated Completion
Purpose: Time:
10 Minutes
Upon completing this project, you will be able to add a hyperlink to an HTML document
and set a target for a hyperlink.
Video Reference:
Session 2
Steps for Completion:
Topic: Navigation Elements
1. Open the 33b-index.html file in the MusicStore2 student folder. Subtopic: The A Tag: Targets
2. Using the text, Spotlight, in the navigation area at the bottom of the page, add a
hyperlink to the 33b-spotlight.html file. Objectives Covered:
3. Save your changes. 3 Structure Documents Using HTML
4. Preview the webpage in a web browser. 3.3 Construct and analyze markup that
5. Click the Spotlight link.You should be taken to the 33b-spotlight page. implements navigation
3.3.b The a tag
6. Return to your code editor.
3.3.c Targets
7. Adjust the link target to have the spotlight page open in a new tab.
8. Save your changes.
9. Preview the webpage in a web browser.
10. Test the Spotlight hyperlink. It should open in a new tab.
25 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Bookmarks Project Details
A bookmark is a type of hyperlink that navigates to a specific location on a webpage.
This can be a location on the same webpage as the hyperlink or to a specific location on
Project Files:
33d-books.html
a different page. The location for the bookmark must be defined. This is done using the
anchor (a) tag and the name attribute. Then, the hyperlink uses the # symbol in front of
the bookmark name. Estimated Completion
Time:
Purpose: 5 Minutes
Upon completing this project, you will be able to add a bookmark to an HTML
document.You will also be able to link to the bookmark. Video Reference:
Session 2
Topic: Navigation Elements
Steps for Completion:
Subtopic: Bookmarks
1. Open the 33d-books.html file in the MusicStore2 student folder.
2. Create a bookmark with the name, sale, just above the paragraph starting with the Objectives Covered:
words, Special sale, near the bottom of the page. 3 Structure Documents Using HTML
3. Near the top of the page, add a hyperlink around the text, This month’s sale, with 3.3 Construct and analyze markup that
the hyperlink linking to the bookmark you just created. implements navigation
4. Save your changes. 3.3.d Bookmarks
5. Preview the webpage in a web browser.
6. Click the link on the text, This month’s sale.You should be taken to the bottom of
the page.
26 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Relative and Absolute Links Project Details
Hyperlinks are relative or absolute depending on where the link is located. A relative link Project Files:
is a hyperlink located within the same website from the HTML document from where 33e-spotlight.html
the link originates. An absolute link is a hyperlink in which the destination is not in the
same website of the webpage from which the link originates. Because of this, to keep
users on your webpage you will want to add a target so that the new webpage will open
Estimated Completion
in a new tab. Time:
5 minutes
As the hyperlink you created earlier in this domain was a relative link to a webpage
within the same website, this project will focus more on absolute links. Video Reference:
Session 2
Topic: Navigation Elements
Purpose: Subtopic: Relative vs. Absolute
Upon completing this project, you will be able to determine if a link is relative or Links
absolute and use both links in an HTML document.
Objectives Covered:
Steps for Completion: 3 Structure Documents Using HTML
1. Open the 33e-spotlight.html file in the MusicStore2 student folder. 3.3 Construct and analyze markup that
implements navigation
2. Add an absolute link to the text: More on kazoos. Use the website: https://
3.3.e Relative vs. absolute links
en.wikipedia.org/wiki/kazoo for the complete absolute link address.
3. Add a target to the open absolute link so the new webpage will open in a new tab.
4. Save your changes.
5. Preview the webpage in a web browser.
6. Click the hyperlink on the text, More on Kazoos.You should see the Wikipedia
article appear on its own tab.
27 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Navigating Folder Hierarchies Project Details
Relative hyperlinks are often located within folders different from the pages in which
they originate. For simple folder hierarchies, the folder name needs to precede the Project Files:
33f-links.html
webpage name in a hyperlink if the folder is below the webpage in the hierarchy of the
website. However, if the folder is above the webpage in the hierarchy, two dots and a
backslash need to be placed in front of the folder name. Estimated Completion
Time:
Purpose: 5 Minutes
Upon completing this project, you will know the commands to move up and down a
folder path and be able to use the up or down commands on an HTML document. Video Reference:
Session 2
Steps for Completion: Topic: Navigation Elements
Subtopic: Folder Hierarchy
1. Open the 33f-links.html file in the TestPages folder within the MusicStore2 Navigation
student folder.
2. Add a hyperlink around the text, Link to the home page. The hyperlink reference Objectives Covered:
should navigate up a folder path and then over to the index.html page. 3 Structure Documents Using HTML
3. Save your changes. 3.3 Construct and analyze markup
4. Preview the webpage in a web browser. that implements navigation
5. Click the link you created in this project. It should navigate you to the home page. 3.3.f Navigating simple folder
hierarchies
6. Close all open files in both your browser and your editor.
28 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Action and Method Attributes Project Details
This is the first of several projects in a row that will focus on form building. The first
two concepts to cover are action attributes and method attributes. An action attribute
Project Files:
34a-contactus.html
references webpages or scripts that process information to a database. The method
attribute will determine what type of action the form will take when it is submitted.
There are four types of submission methods: Estimated Completion
GET: A request to retrieve data Time:
5-10 Minutes
POST: A request to modify data on a server
PUT: A request to add data to a database
Video Reference:
DELETE: A request to remove information from a database
Session 2
Topic: Form Elements
These attributes are part of the main tag of a form which is the form tag. Subtopic: Action and Method
Attributes; Submission Methods
Purpose:
Upon completing this project, you will be able to create a form and add an action Objectives Covered:
attribute and a method attribute to the form. 3 Structure Documents Using HTML
3.4 Construct and analyze markup that
uses form elements
Steps for Completion: 3.4.a Action attribute
1. Open the 34a-contactus.html file in the MusicStore2 student folder. 3.4.b Method attribute
2. Add an opening and closing form tag on the line below the text: insert form here. 3.4.c Submission methods
3. Add an action attribute in the open form tag to point the thankyou.html webpage.
4. Add a method attribute that will post information to a server.
5. Save your changes.
6. Which submission method is used to add information to a database?
7. Which submission method adds the words used for submission to the end of a
URL?
29 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Accessibility Project Details
An input form creates a webpage that information can be added to. Input forms are
used for questionnaires, surveys, or applications. The access keys and tab index allow the Project Files:
34d-contactus.html
user to move the cursor between input areas, on a form, using a keyboard rather than
a mouse. This can help websites become more accessible-friendly for people who need
assistance in navigating a website. Estimated Completion
Time:
Purpose: 10 Minutes
Upon completing this project, you will be able to create an input form using access keys
and the tab index to make the HTML document more accessible. Video Reference:
Session 2
Steps for Completion: Topic: Form Elements
Subtopic: Accessibility
1. Open the 34d-contactus.html file in the MusicStore2 student folder.
2. To the input tag for the first name, add an accesskey attribute with the letter, f, and a
tab index with a setting of 1
Objectives Covered:
3 Structure Documents Using HTML
3. To the input tag for the last name, add an accesskey attribute with the letter, l, and a 3.4 Construct and analyze markup
tab index with a setting of 2 that uses form elements
4. To the input tag for the email address, add an accesskey attribute with the letter, e, 3.4.d Accessibility
and a tab index with a setting of 3
5. Save your changes.
6. Preview the webpage in a browser.
7. Use the Tab key on the keyboard to test navigating through the first three fields on
the form.
8. Use the Alt key plus the letters you added as access keys for navigating to specific
fields.
30 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Input Types and Labels Project Details
As most information on a form is input by a user, HTML supports several types of
input tags, many of which we will see over the next few projects. Some information is Project Files:
34e-contactus.html
supported through an input tag with an attribute such as text, email, check box or a
button. Other form fields are created through separate tags, such as the select tag for a
drop-down list and button tags, which are used for buttons. Estimated Completion
Time:
Labels often accompany input tags. Labels help to define text next to an input field. 15 Minutes
The other benefit of a label is that with a label tag, a user can click a label and have the
cursor be placed in the matching input field. For this to work, the for attribute for a Video Reference:
label must have the same text as the input field’s name attribute. Session 2
Topic: Form Elements
Subtopic: Input Types and
Input fields should also have an id attribute set as those are needed in case any scripts Restrictions
are written to perform dynamic processing on those fields.
Objectives Covered:
Purpose: 3 Structure Documents Using HTML
Upon completing this project, you will be able to create input tags, input tag attributes, 3.4 Construct and analyze markup
label tags, and label tag attributes. that uses form elements
3.4.e Input types and restrictions
Steps for Completion:
1. Open the 34e-contactus.html file in the MusicStore2 student folder.
2. Within the opening and closing form tags, add an input tag with the type set to text
and the name and id set to firstname
3. Add a line break after the input tag.
4. Above the input tag, add an opening and closing label tag with the label’s for
attribute set to firstname
5. In between the opening and closing label tag, add the text, First Name
6. Below the existing input tag, add a second opening and closing label tag with the for
attribute set to lastname
7. In between the opening and closing label tags, add the text, Last Name
8. On the next line, add an input tag with the type set to text and the name and id set
to lastname
9. Below the existing input tags, add a third opening and closing label tag with the for
attribute set to email
10. In between the opening and closing label tags, add the text, Email Address
11. On the next line, add an input tag with the type set to email and the name and id
set to email
12. Save your changes.
13. Preview your webpage in a web browser.You should have these fields and labels in
your form:
31 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
The Select Tag Project Details
A select tag is used to create a drop-down list in a form. Whereas a select tag creates
the list, option tags define the items within the drop-down list. With select tags, a value Project Files:
34f-contactus.html
is important to each option within the select tag. A script or database will only recognize
the value name. An automatic default can be assigned to an option within the drop-down
list to make the form user-friendly. This is done through adding the selected attribute to Estimated Completion
the default option. Time:
10 Minutes
Purpose:
Upon completing this project, you will be able to create a select tag, add options, add Video Reference:
values to those options, and assign a default setting to an option. Session 2
Topic: Form Elements
Steps for Completion: Subtopic: Select Tag
32 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Textarea Tag Project Details
The input tag, a tag we saw earlier in this domain, allows for a single line of text to be
entered in a form. A textarea tag allows for multiple lines of text to be typed into a text Project Files:
34g-contactus.html
box. It is often used to allow people to fill out a comment form, for example.
33 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Button Tags Project Details
There are two ways to add a button to an HTML document. An input tag with a button
attribute allows one to create a button used to submit or reset a form. Most other Project Files:
34h-contactus.html
actions with buttons should be built using the button tag.
34 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Output Tags Project Details
An output tag will take information that is being put into the form and make calculations
with the information. The output tag needs a name, which is then referred to in an Project Files:
34i-contactus.html
oninput attribute added to the form tag. This oninput attribute will actually contain the
calculation that is added to the output tag.
Estimated Completion
Purpose: Time:
Upon completing this project, you will be able to use an output tag in an HTML 5 Minutes
document.
Video Reference:
Steps for Completion: Session 2
Topic: Form Elements
1. Open the 34i-contactus.html file in the MusicStore2 student folder.
Subtopic: Output Tag
2. Add an oninput attribute in the form tag, setting the attribute to use the following
formula: fn.value = firstname.value + “ “ + lastname.value
Objectives Covered:
3. Add an opening and closing output tag on the line below the button input tag, using 3 Structure Documents Using HTML
the name fn for the tag. 3.4 Construct and analyze markup
4. Save your changes. that uses form elements
5. Preview the webpage in a browser. As you type information into the name fields, the 3.4.i Output tag
information should show automatically next to the Send it button.
35 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Option Tag Project Details
HTML documents have two ways to create option tags: they can be individual option
tags or can be grouped into group option tags. In a previous lesson, individual option tags
Project Files:
34j-contactus.html
were added to an input form to add functionality. Group option (optgroup) tags take
individual option tags and group them in similar groups to make options easy to read.
Estimated Completion
Purpose: Time:
10 Minutes
Upon completing this project, you will be able to use options and option groups in an
HTML document.
Video Reference:
Session 2
Steps for Completion:
Topic: Form Elements
1. Open the 34j-contactus.html file in the MusicStore2 student folder. Subtopic: Option Tag
2. Insert a blank line above the option value for the TV.
3. On the new blank line, add an opening optgroup tag with the label, Media Objectives Covered:
4. Close the optgroup tag after the option for Other. 3 Structure Documents Using HTML
5. Surround the options for Google and Bing with an optgroup tag with the label, 3.4 Construct and analyze markup
Web that uses form elements
3.4.j Option tag
6. Save your changes.
7. Preview your webpage in a web browser.
8. Click the drop-down arrow under the How did you hear about us? line.You should
see the following:
36 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Datalist Project Details
A datalist tag creates a prepopulated list of possible answers in an input form. This can
help users use values you want in a form field without having to display a drop-down list
Project Files:
34k-contactus.html
right away, as is the case with a select tag. A datalist typically works in conjunction with
an input tag with a list attribute.
Estimated Completion
Purpose: Time:
10 Minutes
Upon completing this project, you will be able to add a datalist tag to an HTML
document and populate it with values.
Video Reference:
Session 2
Steps for Completion:
Topic: Form Elements
1. Open the 34k-contactus.html file in the MusicStore2 student folder. Subtopic: Datalist Tag
2. Add a paragraph tag on the line before Add comments below, with the text, What
instrument are you most interested in learning? Objectives Covered:
3. Add an input tag on the line below the paragraph, with the list attribute set to 3 Structure Documents Using HTML
instruments and the name set to instrument 3.4 Construct and analyze markup
4. Add an opening and closing datalist tag on the line below the input tag, with the id that uses form elements
set to instruments 3.4.k Datalist tag
5. Add four option tags inside the open datalist tag.
6. Set the values of the four option tags to guitar, piano, drums, and bass
7. Set the text in between the each opening and closing option tag to guitar, piano,
drums, and bass, respectively.
8. Save your changes.
9. Preview the webpage in a web browser.
10. Click in the What instrument are you most interested in learning? field.
11. Begin to type the word, piano.You should see the piano value appear as a choice.
37 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Fieldset and Legend Tags Project Details
The fieldset tag allows a user to group fields on a form to make the form user-friendly.
A fieldset defines a box around a set of fields. A fieldset tag also requires a legend tag,
Project Files:
34l-contactus.html
which represents the name of the fieldset.
9. Save and close all of your open files, both in the browser and your code editor.
38 | Session 2 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 3
Fill-in-the-Blanks Session 3
Instructions: While watching Session 3, fill in the missing words according to the information presented by the instructor.
[References where answers are found are in brackets.]
2. When adding a hyperlink to an image, make sure the img tag is surrounded by the tag and not
the other way around. [Image Links]
4. Vector graphics are rendered using , which means that when they are resized the graphics will
not become pixelated. [SVG Tag]
5. To get a canvas to run when a page loads, the canvas tag must be inside a JavaScript function that is added to the
method of the tag of the webpage. [Canvas Tag]
7. Audio tags should have the attribute added to allow a user to control when the audio plays.
[Audio and Source Tags]
8. When using .vtt files, the two most common formats are and subtitles. [Track Tag]
9. An iframe is essentially a frame inside of a webpage that holds content, and allows you to put one
file inside of another. [iFrame Implementations]
40 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Add Images Project Details
When linking an image to a webpage, make sure the image dimensions fit the
webpage. The quality of the image is affected by changing the dimensions of an
Project Files:
41a-instruments.html
image, so choose images that will still maintain a high-quality image.
mandolin.jpg
trombone.jpg
Purpose:
Upon completing this project, you will be able to link an image in an HTML document Estimated Completion
and change the image dimensions to fit the webpage.
Time:
10 Minutes
Steps for Completion:
1. Open the 41a-instruments.html file in the MusicStore3 student folder. Video Reference:
2. Add an image tag on the line above the text, Mandolin. Session 3
3. Set the image source to be the mandolin.jpg file from the images folder. Topic: Image, SVG, and Canvas
4. Set the width of the image to 460 Elements
Subtopic: Add images
5. Set the height of the image to 345
6. Set the alternative text of the image to mandolin
Objectives Covered:
7. Above the paragraph with the word, Trombone, add an image tag with the source 4 Present Multimedia Using HTML
set to the trombone.jpg file from the images folder, the width set to 460, the 4.1 Construct and analyze markup
height set to 345, and the alternative text set to trombone that displays images
8. Save your changes. 4.1.a Img and picture elements and
9. Preview the webpage.You should see two pictures: one of a mandolin and one of a their attributes
trombone.
41 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Image Layouts and Links Project Details
For a consistent image layout in a webpage, there are two main ways to accomplish this.
Either the images should be placed in a table, or one can use CSS styles to lay out the Project Files:
41a-instruments2.html
images. As CSS is covered later in this course, this project will show how to use a table
to align images to text.
Estimated Completion
Hyperlinks can also be added to images. A common use for this is to link an image to a Time:
larger version of it, which technically is a different file. 10 minutes
42 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
SVG and Canvas Tags Project Details
SVGs (Scalable Vector Graphics) are created using math instead of pixels and can change
scale easily without becoming pixelated. A canvas is a defined area of a webpage that
Project Files:
42-svg.html
contains text and defined shapes. The canvas tag is similar to SVG but has different
42-canvas.html
syntax that allows JavaScript to add detailed design to the canvas. SVGs are strictly
graphic elements. The canvas tag is used when both text and graphics need to be applied
to a specific area of the webpage. Estimated Completion
Time:
5-10 Minutes
Note that an SVG can contain text but the text will be in a graphics format and thus
cannot be adjusted within a webpage.
Video Reference:
Session 3
Purpose:
Topic: Image, SVG, and Canvas
Upon completing this project, you will know the difference between an SVG and canvas Elements
tag and be able to apply them to a webpage. Subtopic: SVG Tag: Canvas Tag
43 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Video and Source Tags Project Details
When linking a video to a webpage you will want to use multiple sources with multiple
video formats as not all browsers support all video formats. When adding a video, it is
Project Files:
43a-media.html
good practice to add controls so a user can control the play settings of the video.
Happy.mp4
Happy.mov
Purpose:
Upon completing this project, you will be able to add a video tag, video controls, and Estimated Completion
multiple play sources to an HTML document.
Time:
10 Minutes
Steps for Completion:
1. Open the 43a-media.html file in the MusicStore3 student folder. Video Reference:
2. Add an opening and closing video tag below the paragraph, See this cool close-up of Session 3
a piano player. Set the video height to 480 Topic: Video and Audio Formats
3. Add the controls attribute to the opening video tag. Subtopic: Video and Source Tags
4. Inside the video tag, add a source tag for the video file, Happy.mp4, located in the
Videos folder, with the type video/mp4 Objectives Covered:
5. On the next line, add a source for the video file, Happy.mov located in the Videos 4 Present Multimedia Using HTML
folder, with the type video/quicktime 4.3 Construct and analyze markup
that plays video and audio
6. Save your changes.
4.3.a Video tag
7. Preview the webpage in a web browser.You should see a video player with controls. 4.3.d Source tag
8. Play the video.
44 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Audio and Track Tags Project Details
Audio tags are added to an HTML file in a very similar fashion as that of video tags. An
audio tag can have multiple source tags and should have audio controls for the user to Project Files:
43b-media.html
control audio play settings.
metronome_audio.mp3
subtitles.vtt
The track tag works with VTT (web video techs track standard) files. Track tags and VTT
files are not supported by all web browsers. The most common VTT formats that are
Estimated Completion
used are captions and subtitles. The language to use will need to be specified in the track
tag. The track tags can have multiple files with multiple languages if needed. Time:
10 Minutes
Purpose:
Upon completing this project, you will be able to add an audio tag with controls to an
Video Reference:
Session 3
HTML document.You will also be able to add a track tag using subtitles to a video tag.
Topic: Video and Audto Formats
Subtopic: Audio and Source Tags;
Steps for Completion: Track Tag
1. Open the 43b-media.html file in the MusicStore3 student folder.
2. Add an opening and closing audio tag below the paragraph that starts with, Don’t Objectives Covered:
know what a metronome sounds like? 4 Present Multimedia Using HTML
3. Add the controls attribute to the opening audio tag. 4.3 Construct and analyze markup that
plays video and audio
4. Inside the audio tag, add a source attribute for the audio file, metronome_audio.
4.3.b. Audio tag
mp3, located in the Audio folder, with the type audio/mp3
4.3.c Track tag
5. Below the two source tags within the video tag, add a track tag with the source set 4.3.d Source tag
to subtitles.vtt from the Videos folder, the kind to subtitles, the source language
to en, and the label to English.
6. Save your changes.
7. Preview the webpage in a web browser.You should see an audio control with
controls.
8. Play the audio.
45 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Simple Iframe Implementations Project Details
An iframe is a frame that holds content inside a webpage. The iframe can hold a source
from another webpage that can easily be changed with the click of a button or other
Project Files:
43e-media.html
user interaction. An iframe will let you put one HTML file within another HTML file.
vtt.html
Purpose:
Estimated Completion
Upon completing this project, you will know what an iframe does, as well as how to
apply it to a webpage.
Time:
5 Minutes
6. Save and close all of your open files, both in the browser and in your code editor.
46 | Session 3 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 4
Fill-in-the-Blanks Session 4
Instructions: While watching Session 4, fill in the missing words according to the information presented by the instructor.
[References where answers are found are in brackets.]
2. The order of precedence in style sheets is that styles take precedence over
styles which take precedence over styles. [Style Sheet Precedence]
4. A class is a style that can be applied to any at any time. [Apply Classes]
5. An id is a selector comparable to a class but it should only be used once per . [Apply IDs]
9. In CSS, the more the style, the more likely you will have problems when testing across different
browsers. [Multiple Browser Tests]
10. Always take control of the fonts displayed on your website to prevent the users’ fonts from
being used. [Web Safe Fonts]
48 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Creating Style Sheets Project Details
Style sheets, better known as Cascading Style Sheets (CSS), are used to control
formatting within a webpage and, as is the case with external style sheets, part or all of Project Files:
21a-index.html
a website. Style sheets consist of one or more combinations of an HTML tag or class
paired with one or more formatting properties. There are three types of style sheets
one can use in web design: Estimated Completion
External: a style sheet that is created as a separate file and then applied to some Time:
or all pages in a website. 10 Minutes
Internal: a style sheet that is created and applied to a single webpage.
Inline: a style applied directly to an HTML tag on a webpage. Video Reference:
Session 4
Topic: Define Style Sheets
The cascading part of Cascading Style Sheets works in this manner: inline styles will take Subtopic: Inline, Internal, and
precedence over internal styles and internal styles will take precedence over external External Styles
styles. For example, an inline style for a single paragraph (p) tag could set the color to
navy. An internal style sheet could set paragraphs to maroon. An external style sheet
Objectives Covered:
could set paragraphs to gray. In this instance, all paragraphs except the navy one would
2 Understand CSS Fundamentals
be maroon.
2.1 Analyze the impact of using inline
styles, internal style sheets, and
Purpose: external style sheets
Upon completing this project, you will be able to create a style sheet and apply it to a 2.1.a When to use each style sheet
webpage.
49 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Style Sheet Precedence Project Details
As mentioned in the previous project, inline styles will take precedence over internal
styles and internal styles will take precedence over external styles. For the exam, make Project Files:
21b-main.css
sure you understand this cascading order of styles sheets and be able to identify what
21b-books.html
format will apply to HTML code depending upon the style sheet situation.
21b-index.html
Purpose:
Estimated Completion
Upon completing this project, you will further understand the cascading aspect of
Cascading Style Sheets. Time:
15 Minutes
50 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Valid Syntax for Rule Sets Project Details
A rule set is a combination of a selector which can be a tag, class, or id, and a property
and value pair set in a style sheet. For each rule set, the selector is listed first and the Project Files:
22a-main.css
property and value pairs are all contained within a set of curly brackets. The property
22a-index.html
is listed, a colon is added, the value is added, and then a semicolon finishes the pair.
Properties never contain spaces. Where one would think there is a space, a dash is used.
For example, font family has a property name of font-family. Estimated Completion
Time:
Purpose: 5 Minutes
Upon completing this project, you will understand CSS rule sets and be able to apply a
rule set to a CSS style sheet. Video Reference:
Session 4
Steps for Completion: Topic: CSS Rule Sets
Subtopic: Valid Syntax
1. Open the 22a-main.css file in the MusicStore4 student folder.
2. Within the body rule set, add a background color property with the value set to
#fab66b
Objectives Covered:
2 Understand CSS Fundamentals
3. Save your changes. 2.2 Construct and analyze rule sets
4. Open the 22a-index.html file in the MusicStore 4 folder. 2.2.a Valid syntax for the CSS rule set
5. Preview the webpage in a browser. The webpage background should be a peach
color.
51 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Apply Classes Project Details
A CSS class is a style that can be applied to any tag at any time. A class is created in a
CSS style sheet but applied to an HTML tag. Classes all start with a dot and can have any
Project Files:
22b-main.css
name, so long as the name is valid. For example, a class name cannot have spaces.
22b-books.html
Purpose:
Estimated Completion
Upon completing this project, you will be able to create a CSS class in a CSS style sheet
and apply the class to an HTML tag.
Time:
10 Minutes
52 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Apply ids Project Details
In HTML, ids have multiple purposes. First, any scripts used to enhance an HTML
element will refer to the element by id. Secondly, ids can be added to CSS files and Project Files:
22b2-main.css
then used in a similar fashion as are classes. However, an id can only be used once
22b2-spotlight.html
per webpage in this scenario. Classes can be used an unlimited number of times per
webpage.
Estimated Completion
Whereas classes start with a dot, ids, start with a pound symbol (#). Time:
10 Minutes
Purpose:
Upon completing this project, you will be able to create a CSS id and apply the id to an
Video Reference:
Session 4
HTML tag.
Topic: CSS Rule Sets
Subtopic: Apply IDs
Steps for Completion:
1. Open the 22b2-main.css file in the MusicStore4 student folder. Objectives Covered:
2. Below the current list of rule sets, add an id selector with the name, sidenote 2 Understand CSS Fundamentals
3. Within the selector, add a rule set that sets the background color to #dbd9d9 2.2 Construct and analyze rule sets
4. Save your changes. 2.2.b Selectors (class, id, elements,
pseudo-class)
5. Open the 22b2-spotlight.html file in the MusicStore4 student folder.
6. Locate the aside tag that starts with the text, Come in and sign up for a free kazoo
demonstration.
7. Add the id attribute of sidenote to the aside tag.
8. Save your changes.
9. Preview the webpage in a browser.You should see a gray background on the aside
text.
53 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Apply Pseudo Classes Project Details
A CSS pseudo class applies specifically to an HTML tag. A tag can have multiple
pseudo classes that can be applied to that specific tag. For example, the anchor tag (a) Project Files:
22b3-main.css
has multiple pseudo classes, with the link, visited, and hover pseudo classes as some
22b3-books.html
examples. A psuedo class is added, after a colon, to a tag in a rule set.
54 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Reusing Rules and Rule Sets Project Details
Code that can be reused will save time and limit errors. To reuse code is simply just a
matter of copying and pasting the code where it is needed. Of course, you will want to
Project Files:
23a-main.css
make sure that if you intend to make slight adjustments to code that you are reusing you
23a-spotlight.html
do so in the correct spots.
55 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
CSS Comments Project Details
Comments are used to explain code and are best practice when multiple people are
collaborating on a CSS style sheet. Code or text within a comment will not show on a
Project Files:
23b-main.css
webpage. Whereas HTML comments start with a <!-- and end with a -->, CSS comments
23b-spotlight.html
start with a /* and end with a */.
Estimated Completion
Comments can also be used over existing code to force a style sheet to ignore that
code. This can be useful when testing rule sets and property/value combinations on
Time:
5 Minutes
webpages.
56 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Multiple Browser Tests and Web Project Details
When working with the font-family property in style sheets, you will want to use
multiple fonts as not every user has every font you may want to display.You will also Video Reference:
want to indicate the font family being used so that a user’s default font for a specific Session 4
family can be used if needed. This will at least ensure that the font displayed is similar Topic: CSS Best Practices
to the font you intended for that particular style. This is the concept of using Web Safe Subtopic: Multiple Browser Tests;
Web Safe Fonts
fonts, fonts that will properly display in a web browser.
57 | Session 4 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 5
58 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Fill-in-the-Blanks Session 5
Instructions: While watching Session 5, fill in the missing words according to the information presented by the instructor.
[References where answers are found are in brackets.]
2. In using CSS to control your overall page layouts, the max-width property takes precedence over the
property. [Max-Width Used with an Element]
3. , none, right, and left are valid values used in setting the float property. [Float Positioning]
4. Relative positioning can be used to shift elements in relation to their normal location. [Relative
Positioning]
5. Absolute positioning changes the of elements below the element being positioned. [Absolute
Positioning]
6. Setting the overflow property helps control what happens when extra content breaks out of an element’s
area. [Overflow Settings]
7. The alignment for a block element’s inner content can be controlled with the property.
[Alignment]
8. Inline is the default setting of the property, which defines a given element’s rendering box. [Inline
vs. Block]
10. Using shorthand to set margins sets them in the following order: , ,
, and . [Box Model Margins]
11. control gaps between objects while controls the gaps between the
edges of an object and text inside of it. [Box Model Padding]
13. In HTML, colors are often assigned using values instead of names. [Color]
14. The font-style property can be used to italicize text, but the property will not make text . [Font-
Style]
16. The default color for a hyperlink that has been visited is . [Link Colors]
17. The property can move text to the bottom of an element. [Text-Alignment]
21. A border style that is not supported in a browser will make a border . [Border-Style]
22. If a border width is not set, a will determine the border width. [Border-Width]
24. The more a layout, the less fluid the layout is across multiple devices. [Divs]
25. colors have better support across browsers than do named colors. [Working with Colors]
Responsive Layouts
26. The measurement is equivalent to the font size being used. [Units of Measure]
27. To optimize pages for a variety of devices, use a tag with a viewport setting to instruct the
browser on how to adjust the page’s scaling and dimensions. [Viewport]
28. A media query can change style sheets according to screen . [Media Query]
29. Using percentages for measurements helps one to avoid having to left to right to view a
webpage. [Percentages and Pixels]
30. A framework can be created or from a third party. [Frameworks and Templates]
31. The max-width property can help fix fluid measurements on screens with a very large [Max-
Width Property]
60 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Height and Max-Width Used with Project Details
61 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Float Positioning Project Details
When an element is floated, it is moved to a specific area on the screen so other
elements below it can move up. Elements can be float positioned side by side if the
Project Files:
51af-positioningexample.html
screen width will allow the change, or they can float with one side or both sides of the
element cleared out using the clear property within CSS.
Estimated Completion
Purpose: Time:
10 Minutes
Upon completing this project, you will be able to use the float property to style a
webpage with elements that are side by side or alone on the webpage.
Video Reference:
Session 5
Steps for Completion:
Topic: Position Text with CSS
1. Open the 51af-positioningexample.html file in the MusicStore5 student folder. Subtopic: Float Positioning
2. In the style sheet, add a property/value pair to the blue rule set that sets the float
property to left Objectives Covered:
3. In the yellow rule, add a property/value pair that sets the float property to left 5 Style Webpages Using CSS
4. Save your changes. 5.1 Construct and analyze styles that
5. Preview the webpage in a web browser. Notice that the blue element now floats to position content
the left of the yellow element and the yellow element floats to the left of the coral 5.1.a Positioning (float, relative,
absolute, max-width, overflow, height,
element, but the text is spilling out of the coral element. width, align)
6. Return to the code editor.
7. In the yellow rule, add a property/value pair that sets the clear property to both
8. Save your changes.
9. Preview the webpage in a browser.You should see the blue and coral elements side
by side at the top, with the yellow element on the lower left part of the page, alone.
62 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Relative and Absolute Positioning Project Details
Relative and absolute positioning give more control over where elements are placed on Project Files:
a webpage than the float property. Relative positioning of an element positions it offset 51ar-positioningexample.html
relative to where the normal position was and is not an exact set location. Relative
positioning does not otherwise change the overall flow of elements.
Estimated Completion
Time:
Absolute positioning of an element will position it exactly in the location placed in the 15 Minutes
code. Absolute positioning will change the flow of elements below it if they are not also
absolutely positioned. Absolute positioning will give you the most control of elements in
a webpage. Video Reference:
Session 5
Topic: Position Text with CSS
Purpose: Subtopic: Relative Positioning:
Upon completing this project, you will be able to use relative and absolute positioning of Absolute Positioning
elements in a webpage.
Objectives Covered:
Steps for Completion: 5 Style Webpages Using CSS
1. Open the 51ar-positioningexample.html file in the MusicStore5 student folder. 5.1 Construct and analyze styles that
position content
2. In the internal style sheet, comment out the float property/value combination in the
5.1.a Positioning (float, relative,
blue rule set. absolute, max-width, overflow, height,
3. Comment out both the float and clear property/value combinations in the yellow width, align)
rule set.
4. In the yellow rule set, add the position property and set the value to relative
5. In the yellow rule set, set the top property to 100px and the left property to
100px
6. Comment out the max-width property/value combination in the coral rule set.
7. In the coral rule set, add the position property and set the value to relative
8. In the coral rule set, add the top property and set the value to 100px
9. Save your changes.
10. Preview the webpage in a web browser. The yellow element should start 100 pixels
below and 100 pixels to the right of the blue element and the coral element should
start 100 pixels below the yellow element.
11. Return to your code editor.
12. In the internal style sheet, change the value of the position property in the yellow
rule set to absolute
13. Save your changes.
14. Preview the webpage in a web browser. The yellow element should overlap part of
the blue element.
63 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Overflow and Alignment Settings Project Details
Overflow settings keep the text from overflowing an element. The main use of the
overflow property is to tell text to scroll if it otherwise does not fit within an element.
Project Files:
51ao-positioningexample.html
It is good practice to set overflow settings to maintain the control of element designs in
different browsers.
Estimated Completion
Another property worth setting for text in CSS is the text-align property. The text-align
Time:
5 Minutes
property can be used in any tag or class that uses text. It is best practice to use CSS for
text alignment.
Video Reference:
Session 5
Purpose:
Topic: Position Text with CSS
Upon completing this project, you will be able to add alignment to an element, and a Subtopic: Overflow Settings;
scroll bar, using overflow settings, to a webpage element. Alignment
64 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Inline vs. Block Project Details
CSS style sheets will default elements to blocks, which places one element after another
on a webpage. The display property can be set to move elements to be in line with each Project Files:
51b-main.css
other on a webpage.
51b-spotlight.html
Purpose:
Estimated Completion
Upon completing this project, you will understand the difference between inline and
block layouts and be able to use them in a CSS style sheet. Time:
5-10 Minutes
65 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Visibility Project Details
Elements can be set not to be visible on a webpage and then dynamically set to display,
Project Files:
usually on either a click or a mouse hover by a user over a visible element along with
51c-positioningexample.html
the getElementById method on the object to set the visibility property to visible. This
is not the same as the details and summary HTML tags, but the visible element can be
used in a similar fashion. Estimated Completion
Time:
Purpose: 10 Minutes
Upon completing this project, you will be able to start with an element not set to visible
and then use an event to make an element visible.
Video Reference:
Session 5
Steps for Completion: Topic: Position Text with CSS
1. Open the 51c-positioningexample.html file in the MusicStore5 student folder. Subtopic: Visibility
2. In the internal style sheet, add the visibility property, with a value of hidden, to the
coral rule set. Objectives Covered:
3. Save your changes. 5 Style Webpages Using CSS
4. Preview the webpage in a web broswer. The coral element should be invisible. 5.1 Construct and analyze styles that
position content
5. Return to your code editor.
5.1.c Visibility
6. In the div tag with the id of yellow, found in the body of the HTML document, add a
paragraph tag with the text, Click to see the coral box
7. In the opening paragraph tag, make an onclick event using JavaScript that will set
the visibility property of the div tag with the coral id to visible
8. Save your changes.
9. Preview the webpage in a web browser.
10. Click the text, Click to see the coral box. The coral box should appear.
66 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Box Model Margins and Padding Project Details
Margins control the distance between objects on a webpage, while padding controls the
distance between edges of an object and the text inside the object. Margins and padding
Project Files:
51d-positioningexample.html
can be set for all sides in one property/value set or a separate property/value set can be
used for each side. When setting the code for all sides at once, the measurements will
move in a clockwise position starting with the top measurement. Estimated Completion
Time:
Purpose: 10 Minutes
Upon completing this project, you will know the difference between margins and
padding and be able to add margins and padding to objects in a webpage. Video Reference:
Session 5
Topic: Position Text with CSS
Steps for Completion:
Subtopic: Box Model Margins; Box
1. Open the 51d-positioningexample.html file in the MusicStore5 student folder. Model Padding
2. In the blue rule set, remove the comment around the float property/value
combination. Objectives Covered:
3. In the yellow rule set, adjust the comment block so that the float property/value 5 Style Webpages Using CSS
combination is not commented out and the clear, position, top, and left property/ 5.1 Construct and analyze styles that
value combinations are commented out. position content
4. In the yellow rule set, add a margin property and set the values to 0px, 10px, 0px, 5.1.d Box model (margins and
padding)
and 5px for the top, right, bottom, and left margins, respectively.
5. In the blue rule set, add a padding property with the value set to .5em
6. In the yellow rule set, add a property that will set the top side padding to .5em
7. Save your changes.
8. Preview the webpage in a browser. There should be space between the box edge
and the text on all sides of the blue box and between the top line and the text in
the yellow box. There should also be a margin in between the two boxes.
9. Close all of your open files in the browser and the code editor, saving changes if
prompted.
67 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Font Families in CSS Project Details
The font properties can have type, size, color, style, and weight all adjusted in a CSS style
sheet. For font families, it is a best practice to use multiple fonts and then a font family Project Files:
52a-main.css
default so that users who do not have the first font specified can still see the text with a
52a-books.html
font you choose, not the default font on their browsers.
68 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Font Colors in CSS Project Details
Font colors can and should be controlled through CSS. There are two basic ways to
assign values to colors. First, color names can be used. Some browsers support more Project Files:
52b-main.css
color names than others, however, so hexadecimal values are a better choice for color
52b-spotlight.html
values, as hexadecimal values are supported in all browsers.
69 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Font Styles and Weights in CSS Project Details
In CSS, font styles control the shape of a font from the standpoint of whether the
font is italic. Font weight controls the boldness of a font, which can be indicated either Project Files:
52c-main.css
with a value of bold or a value from 0 to 1000. A bold font will be more consistent
52c-books.html
with the bold value than with numbers across different browsers. Many browsers will
only recognize 400 and 700 as measurements of boldness, so use other measurements
sparingly. Estimated Completion
Time:
Purpose: 10 Minutes
Upon completing this project, you will be able to apply font styles and font weights to a
CSS style sheet. Video Reference:
Session 5
Steps for Completion: Topic: Format Text with CSS
Subtopic: Font-Style; Font-Weight
1. Open the 52c-main.css file in the MusicStore5 student folder.
2. In the sale rule set, add a font style property with the value set to italic
Objectives Covered:
3. In the sale rule set, add a font weight property with the value set to 700 5 Style Webpages Using CSS
4. Save your changes. 5.2 Construct and analyze styles that
5. Open the 52c-books.html file in the MusicStore5 student folder. format text
6. Preview the webpage in a web browser. The text, Special Sale, should be bold and 5.2.c Font-style
italic. 5.2.d Font-weight
70 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Link Colors in CSS Project Details
The color property changes the font color of text within a CSS rule set. This property
can also be used in pseudo classes. By default, unvisited links are blue, visited links are Project Files:
52e-main.css
purple, and active links are red. These colors can be changed, but in doing so you will
52e-spotlight.html
want to make sure that link colors are consistent throughout your site.
71 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Text Alignment and Decoration Project Details
Text alignment has been covered in previous lessons. In this project, we will be covering
text alignment in tables. Aligning text in a table is important to the presentation of the Project Files:
52f-main.css
table as it can make a table stand out and make it easier to read. Often, the vertical align
52f-hours.html
property is used to position text vertically within a cell.
Estimated Completion
The text-decoration property will control if text is underlined or not underlined.
There are several types of underline styles, but they may not be supported in multiple Time:
browsers. When adding any type of styling it is good practice to check if the style is 10 Minutes
supported in different browsers.
Video Reference:
Purpose: Session 5
Topic: Format Text with CSS
Upon completing this project, you will be able to apply text alignment to a table using
Subtopic: Text-Alignment; Text-
CSS.You will also be able to apply the text decoration property within CSS. Decoration
72 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Indentation Project Details
The text indent property controls the first line text indent in a multi-lined paragraph. To
indent more than the first line in a paragraph, use the padding property.
Project Files:
52fi-main.css
52fi-index.html
Purpose:
Upon completing this project, you will be able to use the text indent property to Estimated Completion
control the indentation of the first line in a paragraph.
Time:
10-15 Minutes
Steps for Completion:
1. Open the 52fi-main.css file in the MusicStore5 student folder. Video Reference:
2. Below the sale class, add a class named indent Session 5
3. Within the new class, add a text indent property with a value of 5em Topic: Format Text with CSS
4. Open the 52fi-index.html file in the MusicStore5 student folder. Subtopic: Indentation
5. Down the page, wrap an opening and closing paragraph tag around the text: We
are open seven days a week...We look forward to seeing you! Objectives Covered:
6. Add the indent class to the open paragraph tag. 5 Style Webpages Using CSS
5.2 Construct and analyze styles that
7. Save your changes. format text
8. Preview the webpage in a browser. The first sentence in the last paragraph on the 5.2.f Text formatting (text alignment,
webpage will be indented. text decoration, indentation)
9. Go back to the 52fi-main.css file in your code editor and change the property you
set earlier from the left indent property to the padding property.
10. Return to the 52fi-index.html webpage in the code editor.
11. Preview the webpage in a web browser. The entire paragraph to which you added
the leftindent class should be indented.
12. Close all open files in your browser and code editor, saving changes if prompted.
73 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Border Color and Style Project Details
The border color property sets a color for a border. The border color only works if a
border style is set, as a border style must be set in order for a border to be displayed. Project Files:
53a-main.css
The more complex the border style, the more important it is to test the style in
53a-spotlight.html
multiple browsers to make sure the border style is supported properly.
74 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Border Width Project Details
The border width property is typically set using pixels as a measurement. A border
width can be set for all sides of an object, or individual widths can be set for each side Project Files:
53c-main.css
of an object. Futhermore, shorthand can be used as a border property can have a width,
53c-spotlight.html
style, and color all set at once.
75 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Backgrounds Project Details
There are two main types of backgrounds that can be used with webpages: colors
and images. In a previous lesson we applied the color property to the body tag, which
Project File:
53d-positioningexample.html
creates a background color. In this project, we will use an image as a background. To use
an image, a pointer to a URL is needed.
Estimated Completion
An additional property that is often used with an image is the background repeat
Time:
5 Minutes
property. A background image can be set to not repeat (no-repeat), to repeat across
the top of a page (repeat-x), or to repeat vertically (repeat-y). The default repeat is to
tile the background image through the page. Video Reference:
Session 5
Topic: Backgrounds and Borders
Purpose:
Subtopic: Backgrounds
Upon completing this project, you will be able to apply an image to the webpage
background and have the image repeat itself on the page.
Objectives Covered:
5 Style Webpages Using CSS
Steps for Completion: 5.3 Construct and analyze styles that
1. Open the 53d-positioningexample.html file in the MusicStore5 student folder. format backgrounds and borders
2. At the bottom of the internal style sheet, add a class named backimage 5.3.d Backgrounds
3. In the new backimage class, add a background image property with its value set to
the URL of the kazoo-transparent.jpg file in the images folder.
4. In the backimage class, add a backrgound repeat property and set its value to have
the background image repeat vertically on the page.
5. Apply the backimage class to the body tag.
6. Save your changes.
7. Preview the webpage in a web browser.You should see a background picture of a
kazoo running down the left side of the page.
76 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Divs and Colors Project Details
A div tag can be used to control the entire width of a webpage. The more fixed your
layout is, the less fluid your webpage will be across different devices. However, this may Project File:
53e-main.css
be necessary if your website is viewed on a lot of smaller devices.
53e-spotlight.html
Colors have been covered throughout this course. Remember that hexadecimal colors
Estimated Completion
are the safest colors to use as they have the largest browser support. Hexadecimal
colors closer to #000000 are darker and hexadecimal colors closer to #FFFFFF are Time:
lighter. The first pair of values indicate the amount of red in the color, the second pair, 10-15 Minutes
green, and the third pair, blue. Colors with matching red, green, and blue pairs, such as
#333333 and #0F0F0F are shades of gray. Video Reference:
Session 5
Purpose: Topic: Backgrounds and Borders
Subtopic: Divs; Working with
Upon completing this project, you will be able to use a div tag to set the width of Colors
a webpage.You will also have a further understanding of how colors are used on a
webpage.
Objectives Covered:
5 Style Webpages Using CSS
Steps for Completion: 5.3 Construct and analyze styles that
1. Open the 53e-main.css file in the MusicStore5 student folder. format backgrounds and borders
2. Before the a tag rule set, add an id-based rule set named pagewidth 5.3.e Divs
3. In the new pagewidth rule set, add a width property with the value set to 500px 5.3.f Colors
4. In the sidenote rule set, change the background color property value to #333333
5. In the sidenote rule set, add a color property with the value set to the same color
as the body background color.
6. Save your changes.
7. Open the 53e-spotlight.html file in the MusicStore5 student folder.
8. Wrap a div tag around the entire body of the webpage (not the body tag itself, but
everything inside the body tag).
9. Set the id of the div tag to pagewidth
10. Save your changes.
11. Preview the webpage in a web browser. The contents of the page should have a
width of 500 pixels, which will bring the side note closer to the body of the text. In
addition, the background color should appear to mask through the sidenote text as
the text color is now the same as the background.
12. Close all of your open files in both the browser and the code editor, saving changes
where prompted.
77 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Units of Measure Project Details
There are several different units of measure that can be used for sizing. Many of these
have already been seen in this course. Here is a recap of units of measure and their uses: Project File:
54a-main.css
em: A relative measurement equivalent to the font size being used. For example,
54a-index.html
3em = 3 x the size of the current font.
ex: A measurement relative to the height of the letter x
Estimated Completion
px: Technically, a measurement that is 1/96” of an inch but can vary based on screen
sizes
Time:
5 Minutes
pt: A measurement that is 1/72 of an inch
cm: A centimeter Video Reference:
in: An inch Session 5
mm: A millimeter Topic: Responsive Layouts
Subtopic: Units of Measure
Purpose:
Upon completing this project, you will know how to set measurements for one or more Objectives Covered:
elements on a webpage. 5 Style Webpages Using CSS
5.4 Analyze styles that implement a
simple responsive layout
Steps for Completion:
5.4.a Units of measure
1. Open the 54a-main.css file in the MusicStore5 student folder.
2. Below the rule set for the six headings, add a rule set for the h1 heading.
3. In the h1 heading rule set, add a font size property with the value set to 18pt
4. Save your changes.
5. Open the 54-index.html file in the MusicStore5 student folder.
6. Preview the webpage in a web browser. The heading, Welcome to the Music Store,
should have a size of 18 points.
78 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Viewport and Media Query Project Details
79 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Percentages and Pixels Project Details
It is important that measurements of elements on a webpage do not exceed the screen
width of a device. Percentages are used to create fluidity with the element and device Project File:
screen size. A fixed pixel measurement is needed at times to control the measurements 54c-hours.html
of an element, like a fixed image. Small tables usually work well with a fluid layout using
percentages. Estimated Completion
Time:
Purpose: 15 Minutes
Upon completing this project, you will know when to use percentages or pixels for units
of measurement on a webpage and how to set a max width for these measurements. Video Reference:
Session 5
Steps for Completion: Topic: Responsive Layouts
Subtopic: Percentages and Pixels
1. Open the 54c-hours.html file in the MusicStore5 student folder.
2. Add an internal style sheet to the head tag, on the line below the link tag.
Objectives Covered:
3. In the internal style sheet, add a rule set for the table tag. 5 Style Webpages Using CSS
4. Within the table rule set, add a width property with the value set to 400px 5.4 Analyze styles that implement a
5. Save your changes. simple responsive layout
6. Preview the webpage in a web browser. 5.4.c Percentages vs. pixels
7. Adjust the size of the web browser. Notice that the table width stays the same
despite the size of the page.
8. Return to your code editor.
9. Change the value of the width property from 400px to 50%
10. Save your changes.
11. Preview the webpage in a browser.
12. Adjust the size of the web browser. The table width will adjust in size to 50% of the
browser size.
80 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Frameworks, Templates, and Max Project Details
81 | Session 5 MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Appendix
82 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Introduction to Programming Using HTML and CSS
(98-383) Suggested Study Plan
Each portion of this study plan is approximately 30-35 minutes and includes video training, fill-in-the-blanks, labs, projects, tests,
as well as the course support files. There is also a notes section for extra notes. By adhering to the lesson plan, it will take
approximately 25.5 hours to complete the course. For workbook projects, we recommend students do the fill-in-the-blank sections
as one watches the course.
83 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 2: 13 lessons for approximately 7.5 hours
84 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Day Tasks Files What is Covered Notes
6 Videos: 33a-books.html 3 Structure Documents Using HTML
Navigation Elements 33b-index.html 3.3 Construct and analyze markup that
Image Links implements navigation
33b-spotlight.
The A Tag 3.3.a Image links
html
Targets 3.3.b The a tag
3.3.c Targets
Worbook projects:
Fill-in-the-Blanks Session 2 Items 17-19
Image Links
Hyperlinks
7 Videos: 33d-books.html 3 Structure Documents Using HTML
Navigation Elements 33e-spotlight. 3.3 Construct and analyze markup that
Bookmarks implements navigation
html
Relative vs. Absolute Links 3.3.d Bookmarks
33f-links.html 3.3.e Relative vs. absolute links
Folder Hierarchy Navigation
3.3.f Navigating simple folder
Workbook projects: hierarchies
Fill-in-the-Blanks Session 2 Items 20-22
Bookmarks
Relative and Absolute Links
Navigating Folder Hierarchies
8 Videos: 34a-contactus. 3 Structure Documents Using HTML
Form Elements html 3.4 Construct and analyze markup that
Action and Method Attributes uses form elements
34d-contactus.
Submission Methods 3.4.a Action attribute
html
Accessibility 3.4.b Method attribute
3.4.c Submission methods
Practice lab:
3.4.d Accessibility
Submission Methods
Workbook projects:
Fill-in-the-Blanks Session 2 Items 23-25
Action and Method Attributes
Accessibility
9 Videos: 34e-contactus. 3 Structure Documents Using HTML
Form Elements html 3.4 Construct and analyze markup that
Input Types and Restrictions uses form elements
34f-contactus.
Select Tag 3.4.e Input types and restrictions
html
3.4.f Select tag
Workbook projects:
Fill-in-the-Blanks Session 2 Item 26
Input Types and Labels
The Select Tag
10 Videos: 34g-contactus. 3 Structure Documents Using HTML
Form Elements html 3.4 Construct and analyze markup that
Textarea Tag uses form elements
34h-contactus.
Button Tag 3.4.g Textarea tag
html
Output Tag 3.4.h Button tag
34i-contactus. 3.4.i Output tag
Workbook projects: html
Fill-in-the-Blanks Session 2 Items 27-29
Textarea Tag
Button Tags
Output Tags
11 Videos: 34j-contactus. 3 Structure Documents Using HTML
Form Elements html 3.4 Construct and analyze markup that
Option Tag uses form elements
34k-contactus.
Datalist Tag 3.4.j Option tag
html
3.4.k Datalist tag
Workbook projects:
Fill-in-the-Blanks Session 2 Items 30-31
Option Tag
Datalist
85 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Day Tasks Files What is Covered Notes
12 Videos: 34l-contactus. 3 Structure Documents Using HTML
Form Elements html 3.4 Construct and analyze markup that
Fieldset Tag uses form elements
Session 2 - Domain 3 Exam Tips
Workbook projects:
Fill-in-the-Blank Session 2 Item 32
Fieldset and Legend Tags
Start Post-Assessment
13 Complete Post-Assessment
86 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 3: 4 lessons for approximately 2.5 hours
Workbook projects:
Fill-in-the-Blanks Session 3 Item 9
Simple Iframe Implementations
Post-Assessment
87 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 4: 6 lessons for approximately 3.5 hours
88 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Day Tasks Files What is Covered Notes
5 Videos: 23b-main.css 2 Understand CSS Fundamentals
CSS Best Practices 23b-spotlight. 2.3 Construct well-formed style sheets
CSS Comments html that conform to industry best practices
Multiple Browser Tests 2.3.b Commenting
23c-spotlight.
Web Safe Fonts 2.3.c Testing on multiple browsers
html
Session 4 - Domain 2 Exam Tips 2.3.d Web safe fonts
23c-main.css
Practice lab:
Testing Browsers
Workbook projects:
Fill-in-the-Blanks Session 4 Items 8-10
CSS Comments
Multiple Browser Tests and Web Safe
Fonts
6 Post-Assessment
89 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Session 5: 16 lessons for approximately 9.5 hours
90 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Day Tasks Files What is Covered Notes
6 Videos: 51d-positioningexample. 5 Style Webpages Using CSS
Postition Text with CSS html 5.1 Construct and analyze styles that
Box Model Padding position content
52a-main.css
Format Text with CSS 5.1.d Box model (margins and
52a-cooks-complete. padding)
Font-Family html 5.2 Construct and analyze styles that
Practice labs: format text
Padding 5.2.a Font-family
Font-Family Property
Workbook projects:
Fill-in-the-Blanks Session 5 Items 11-12
Box Model Margins and Padding
Font Families in CSS
7 Videos: 52a-main.css 5 Style Webpages Using CSS
Format Text with CSS 52a-cooks-complete. 5.2 Construct and analyze styles that
Color html format text
Font-Style 5.2.a Font-family
52c-main.css
Font-Weight 5.2.b Color
52c-books.html
5.2.c Font-style
Practice labs:
5.2.d Font-weight
Font-Style Property
Font-Weight Property
Workbook projects:
Fill-in-the-Blanks Session 5 Items 13-15
Font Colors in CSS
Font Styles and Weights in CSS
8 Videos: 52e-main.css 5 Style Webpages Using CSS
Format Text with CSS 52e-spotllight.html 5.2 Construct and analyze styles that
Link Colors format text
Text-Alignment 5.2.e Link colors
5.2.f Text formatting (text alignment,
Practice labs: text decoration, indentation)
Color Knowledge
Vertical Alignment
Workbook projects:
Fill-in-the-Blanks Session 5 Items 16-17
Link Colors in CSS
9 Videos: 52f-main.css 5 Style Webpages Using CSS
Format Text with CSS 52f-hours.html 5.2 Construct and analyze styles that
Text-Decoration format text
52fi-main.css
Indentation 5.2.f Text formatting (text alignment,
52fi-index.html text decoration, indentation)
Workbook projects:
Fill-in-the-Blanks Session 5 Items 18-19
Text Alignment and Decoration
Indentation
10 Videos: 53a-main.css 5 Style Webpages Using CSS
Backgrounds and Borders 53a-spotlight.html 5.3 Construct and analyze styles that
Border-Color format backgrounds and borders
Border-Style 5.3.a Border-color
5.3.b Border-style
Workbook projects:
Fill-in-the-Blanks Session 5 Items 20-21
Border Color and Style
91 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Day Tasks Files What is Covered Notes
11 Videos: 53c-main.css 5 Style Webpages Using CSS
Backgrounds and Borders 53c-spotlight.html 5.3 Construct and analyze styles that
Border-Width format backgrounds and borders
5.3.c Border-width
Practice lab:
Border Setup
Workbook projects:
Fill-in-the-Blanks Session 5 Item 22
Border Width
12 Videos: 53d-positioningexample. 5 Style Webpages Using CSS
Backgrounds and Borders html 5.3 Construct and analyze styles that
Backgrounds format backgrounds and borders
53e-main.css
Divs 5.3.d Backgrounds
53e-spotlight.html
Working with Colors 5.3.e Divs
5.3.f Colors
Practice lab:
Add a Background Image
Workbook projects:
Fill-in-the-Blanks Session 5 Item 23-25
Backgrounds
Divs and Colors
13 Videos: 54a-main.css 5 Style Webpages Using CSS
Responsive Layouts 54a-index.html 5.4 Analyze styles that implement a
Units of Measure simple responsive layout
54b-spotlight.html
Viewport 5.4.a Units of measure
54b-main.css
Media Query 5.4.b Responsive effects with CSS
(viewport and media query)
Practice lab:
Media Query Syntax
Workbook projects:
Fill-in-the-Blanks Session 5 Item 26-28
Units of Measure
Viewport and Media Query Settings
14 Videos: 54c-hours.html 5 Style Webpages Using CSS
Responsive Layouts 54e-hours.html 5.4 Analyze styles that implement a
Percentages and Pixels simple responsive layout
Frameworks and Templates 5.4.c Percentages vs. pixels
Max-Width Property 5.4.d Frameworks and templates
Session 5 - Domain 5 Exam Tips 5.4.e Max width
Course Conclusion
Final Exam Tips
Final Thoughts
Workbook projects:
Fill-in-the-Blanks Session 5 Item 29-31
Percentages and Pixels
Frameworks, Templates and Max Width
15 Start Post-Assessment
16 Complete Post-Assessment
92 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Introduction to Programming Using HTML and CSS (98-383)
Session 1 Outline
Introduction
Course Welcome
How to Study for This Exam
Well-Formed Markup
DOCTYPE Declaration and Html Tag
Head Tag
Body Tag
Closing Tags
Entities
Comments
Session 1 - Domain 1 Exam Tips
93 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Introduction to Programming Using HTML and CSS (98-383)
Session 2 Outline
Structure Content Through Markup
Table Tags
Table Attributes
Heading Tags
P Tag
Br Tag
Hr Tag
Div Tag
Span Tag
Ul and Li Tags
Ol and Li Tags
Navigation Elements
Image Links
The A Tag
Targets
Bookmarks
Relative vs. Absolute Links
Folder Hierarchy Navigation
Form Elements
Action and Method Attributes
Submission Methods
Accessibility
Input Types and Restrictions
Select Tag
Textarea Tag
Button Tag
Output Tag
Option Tag
Datalist Tag
Fieldset Tag
Session 2 - Domain 3 Exam Tips
94 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Introduction to Programming Using HTML and CSS (98-383)
Session 3 Outline
Image, SVG, and Canvas Elements
Add Images
Image Layouts
Image Links
Svg Tag
Canvas Tag
95 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Introduction to Programming Using HTML and CSS (98-383)
Session 4 Outline
Define Style Sheets
Inline, Internal, and External Styles
Style Sheet Precedence
96 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook
Introduction to Programming Using HTML and CSS (98-383)
Session 5 Outline
Responsive Layouts
Units of Measure
Viewport
Media Query
Percentages and Pixels
Frameworks and Templates
Max-Width Property
Session 5 - Domain 5 Exam Tips
Course Conclusion
Final Exam Tips
Final Thoughts
97 | Appendix MTA Introduction to Programming Using HTML and CSS (98-383) Project Workbook