AP computer science exam 1 with complete solutions
Which of the following is a valid HTML tag?
h1
<>
<h1>
>h1<
<h1>
Which of the following is an example of metadata about a webpage?
The title of the webpage
The body of the webpage
An <h1> tag on the webpage
All of the above
The title of the webpage
What is the function of the <br> tag?
Create a line break on the resulting webpage
Create a horizontal line on the resulting webpage
Italicize text
Bold text
Create a line break on the resulting webpage
Which of the following is the correct HTML code to create a hyperlink that displays Click
Me and to google.com?
<a href="https://google.com">
click Me </a>
C1ick Me"> https://google.com </a>
click Me ca>https://gopgle.com/a> ca>
click Me </a href-"httos://google.com"
<a href="https://google.com"> click Me </a>
Which of the following lines of HTML code will insert an image into a webpage?
<img> https://codehs.com/static/img/logo.png </img>
<img> src="https://codehs.com/static/img/logo.png" </img> <img src="https://codehs.com/static/img/logo.png">
<img https://codehs.com/static/img/logo.png
<img src="https://codehs.com/static/img/logo.png">
Which of the following HTML code snippets would produce the following web page:
Apples
Bananas
Oranges
a. <ul> Apples Bananas Oranges </ul>
b. <ol> Apples Bananas Oranges </ol>
c. <ul> <li>Apples</li> <li>Bananas</li> <li>Oranges</li> </ul>
d. <ol> <li>Apples</li> <li>Bananas</li> <li>Oranges</li> </ol>
<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Oranges</li>
</ul>
Which of the following tags defines a table row?
a. <table>
b. <tr>
c. <th>
d. <td>
<tr>
Which of the following tags defines a table header?
a. <table>
b. <tr>
c. <th>
d. <td>
<th>
Which of the following HTML code snippets will generate the following table?
a. <table border="1">
<tr>
<th>Name</th>
<th>Score</th>
</tr>
<tr>
<td>Karel</td>
<td>32</td>
</tr> </table>
b. <table border="1">
<tr>
<td>Name</td>
<td>Score</td>
</tr>
<tr>
<td>Karel</td>
<td>32</td>
</tr>
</table>
c. <table border="1">
<tr> Name Score </tr>
'<tr> Karel 32 </tr>
</table>
d. <table border="1">
<th>Name</th>
<th>Score</th>
<td>Karel</td>
<td>32</td>
</tr>
</table>
<table border="1">
<tr>
<th>Name</th>
<th>Score</th>
</tr>
<tr>
<td>Karel</td>
<td>32</td>
</tr>
</table>
Which of the following HTML code snippets is the proper way to set the background color of an <h1> tag to be blue?
a. <blue>
<h1>Hello</h1>
</blue>
b. <h1 background-color="blue">Hello</h1>
c. <h1 style="blue">Hello</h1>
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller millyphilip. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.