HTML Exam Review

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which of the following is the correct HTML code to create a hyperlink that displays "CLICK ME" and links to google.com? A) <a href="https://google.com"> Click Me </a> B) <a href="Click Me"> https://google.com </a> C) Click Me <a>https://google.com</a> D) <a> Click Me </a href="https://google.com">

a

Links

The <a> tag creates a hyperlink that is used to link from one page to another. The href attribute indicates the link's destination. Example HTML: <a href = "https://google.com">Google</a>

Images: What does the atl attribute indicate?

alternate text that will display if the image cannot be loaded

The _____________ declaration must be the very first thing in your html document. It is not an html tag, it is an instruction to the web browser about what version of HTML the page is written in.

!DOCTYPE What the code looks like: <!DOCTYPE html>

Images: What does the width and height attributes indicate?

specify the width and height of the image.

Which of the following is a valid HTML tag? a. h1 b. <> c. <h1> d. >h1<

c

Links: what does the <a> tag do?

creates a hyperlink that is used to link from one page to another.

Question: 1 What does URL stand for? A) Underlying Request Layout B) Underlying Response Layout C) Uniform Resource Locator D) Usable Render List

C

What is the fourth step of viewing a web page as described in the video? A) The Response: The server sends a response to the browser with the resource attached B) The Request: The browser sends a message to a server requesting a resource C) Rendering the Page: Your browser takes the resource and renders it in the browser window D) The URL: You type the URL for the web page into your browser

C

What is the first step of viewing a web page as described in the video? A) The Response: The server sends a response to the browser with the resource attached B) The Request: The browser sends a message to a server requesting a resource C) Rendering the Page: Your browser takes the resource and renders it in the browser window D) The URL: You type the URL for the web page into your browser

D

Why do we use CSS? A) HTML wasn't intended to be able to style web pages, CSS allows us to add style B) Separate the content of a web page from the design of a web page C) Easily modify the look and feel of a web site even at a large scale D) All of the above

D

Which of the following tags defines a table row? A) <table> B) <tr> C) <th> D) <td>

b

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>

c

Which of the following lines of HTML code will insert an image into a webpage? A) <img> https://codehs.com/static/img/logo.png </img> B) <img> src="https://codehs.com/static/img/logo.png" </img> C) <img src="https://codehs.com/static/img/logo.png"> D) <img https://codehs.com/static/img/logo.png>

c

The ___________ tells the browser that this is an html document.

html tag What the code looks like: <html>

The ________ defines the title of the page.

title tag <title>Your Page Title</title>

Which of the following tags defines a table header? A) <table> B) <tr> C) <th> D) <td>

c

Links: what does the href attribute do?

indicates the link's destination.

Creating Lists

The ul tag creates an unordered list, and each list item in the list needs its own li tag.

Basic Tags

HTML tags that allow you to specify formatting for text The <p> tag defines a paragraph. The <i> tag displays text in italics. The <b> tag displays text in bold. Example HTML: <p> This is a paragraph where <i>this will display in italics</i> and <b>this will display in bold</b>. </p>

The _________ contains all the contents of an HTML document, such as text, hyperlinks, images, tables, and lists.

body element <body> Inside the body tag is where you put all the cool stuff you want on your page! </body>

What is the third step of viewing a web page as described in the video? A) The Response: The server sends a response to the browser with the resource attached B) The Request: The browser sends a message to a server requesting a resource C) Rendering the Page: Your browser takes the resource and renders it in the browser window D) The URL: You type the URL for the web page into your browser

A

Which of the following code snippets will select all HTML elements with the class "alert" and set their color to be red? A) alert { color: red; } B) .alert { color: red; } C) #alert { color: red; } D) class="alert" { color: red; }

B

Which of the following CSS rules will select the HTML element with the id logo and set the font size for that element to 60 pixels? A) logo { font-size: 60px; } B) .logo { font-size: 60px; } C) #logo { font-size: 60px; } D) id="logo" { font-size: 60px; }

C

Metadata

Data about data. Ex. The webpage is the data, and the title describes the webpage, so the title is data about data.

Images: What does the src attribute indicate?

where the image is coming from and can be either a directory path to a photo saved on your computer or the url of an image on the internet

Header Tags

The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. <h6> defines the least important heading. (Importance given in size) <h1>Level 1 Header</h1> <h2>Level 2 Header</h2> <h3>Level 3 Header</h3>

Horizontal Lines

The <hr> tag defines a thematic break with a horizontal rule. Separates two themes with a horizontal line that implies a thematic break in content Example HTML: <p> This is a section about a certain theme. </p> <hr> <p> This is a section about another theme separated from the previous section by a horizontal line that implies a thematic break in content. </p>

What is the CSS selector to select all tags on a page?

tag name

Which of the following is a valid CSS rule? A) h1 { color: blue; } B) style="color:blue;" C) css="color:blue;" D) h1 { color { blue; } }

A

Images: What tag defines an image in an HTML page?

<img> tag <img src = "https://codehs.com/static/img/logo.png" alt="Image not found" width="50px" height="50px">

Which of the following HTML code snippets will generate the following table? (view pic on lesson 6 quiz) 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>

A

_____________ can be added to any tag to add more information about the tag.

Attributes The general format for adding an attribute and a value for the attribute is: <tag attribute="value">Tag content here</tag>

What is the second step of viewing a web page as described in the video? A) The Response: The server sends a response to the browser with the resource attached B) The Request: The browser sends a message to a server requesting a resource C) Rendering the Page: Your browser takes the resource and renders it in the browser window D) The URL: You type the URL for the web page into your browser

B

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> D) <h1 style="background-color:blue;">Hello</h1>

D

What is the function of the <br> tag? a Create a line break on the resulting webpage b Create a horizontal line on the resulting webpage c Italicize text d Bold text

a

Which of the following is an example of metadata about a webpage? a. The title of the webpage b. The body of the webpage c. An <h1> tag on the webpage d. All of the above

a

The ____________ is a container for all the ____________s, which can include a title for a document, scripts, styles, and more.

head element <head>wordsssssssssssss + other head elements</head>

HTML ______ are keywords that define how the browser must format and display content.

tags- Examples include, header tags, basic tags, etc <tag> It starts with an opening tag and ends with a closing tag. The closing tag has the same name as the opening tag, but with a / Everything inside should be indented one level. </tag>


Ensembles d'études connexes

environmental science a - unit 2: earth systems

View Set

Perosnal Career Development (quiz 7)

View Set

C482 Software 1: Oracle Certified Associate Java SE 8

View Set