principles of computing Quiz 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The <br> tag has a closing tag.

False

Quirks Mode

a browser rendering mode that renders a web page using non-standard layout rules emulating older web browsers

The <br> tag creates:

a line break in a paragraph, such that the content after the line break appears on a new line. A good practice is to use <br> when the line break is essential to the content, such as lines in a poem or mailing address, and not just to add spacing for formatting a web page. CSS, discussed elsewhere, should be used for formatting a web page.

comment

a portion of the document that is not displayed by the browser. A comment begins with the <!-- character sequence and ends with the --> character sequence. Web developers sometimes use comments to leave notes for themselves or others, or to tell the browser to ignore part of the document. A common error is trying to put a comment inside of another comment

alt attribute

provides a text description to use as an alternative to displaying the image.

HTML

(hyper-text markup language) is a textual language for creating web pages. Files are usually saved with a .html or .htm file extension, as in index.html.file contains normal text surrounded by tags that indicate formatting, links, or other items. A web browser like Chrome, Firefox, Safari, or IE reads an HTML file and displays the page. An HTML file typically starts with an indication of the document type, then a header portion with the page title and other page information, and finally a body portion with the actual page content.

reasons for alt attribute: allow browser to turn off image display

A user may want to reduce data cost or load a page faster. Image loading can be disabled in a web browser. Ex: A mobile phone user may disable loading images to avoid exceeding their plan's data limit. Typically, the browser will display the alt text in place of the image.

Web Browser

Chrome, Firefox, Safari, or IE reads an HTML file and displays the page

file

Hyperlink used to refer to a document on the same computer as the web browser. Indicates that the browser should look for a file on the user's computer and not a server .

malito

Hyperlink used to send email. Indicates that the browser should use an email program to send a message

http

Hyperlink used to send requests and responses over the Internet without encryption. HTTP is an unencrypted protocol for sending requests and responses. A third party can intercept and view data sent using HTTP.

https

Hyperlink used to send requests and responses that are readable only by the client and server. HTTPS is a secure protocol that encrypts requests and responses. A growing trend is to use HTTPS instead of HTTP.

ftp

Hyperlink used to transfer data files. The FTP protocol is used to transfer a file from the web server to the web browser.

<!DOCTYPE html>

Instruction to web browser that specifies the document type. The HTML document must start with the <!DOCTYPE html> declaration. .

You must read <em><cite>A Tale of Two Cities</em></cite>, one of the best selling books of all time

Invalid. This HTML markup is illegal because the <cite> opening tag is placed after the <em> opening tag, but the </cite> closing tag is placed after the <em> tag.

markup

Part of a document that explains how to interpret or structure other parts of the document. Markup are instructions to a browser about the rest of the document.

You <em>must</em> read <cite>A Tale of Two Cities</cite>, one of the best selling books of all time

Valid. The <em> opening and closing tags are both placed before the <cite> tags.

<p>This is a very short paragraph.</p>

Valid. The paragraph has an opening <p> tag, the paragraph body, and the closing </p> tag.

unordered list

a collection of items, usually indented and shown using bullets, surrounded by the <ul> opening and closing tags. Each list item is surrounded by <li> opening and closing tags.

Section

a collection of related paragraphs, images, and other content organized into units such as chapters, subchapters, tabbed content in a tabbed container, and numbered sections of a thesis. Sections are surrounded by the <body> and <section> tags, or are implicitly created using a heading tag. A subsection is a section nested within another section. The section wrapped in <body> tags is the top-level section of the web page. All other sections wrapped in <section> tags are considered subsections

target attribute

indicates how the browser should display the link when clicked. _self, which is the default value for the target attribute, indicates the browser will open the link in the same tab or window. If the target attribute is _blank, the web browser will open the link in a new tab or window.

closing tag

indicates the ending point in the document where the tag stops having an effect. </p>

opening tag

indicates the starting point in the document where the tag takes effect <p>

<strong> tags indicates

text that has strong importance, and is bolded by default.

paragraph

the basic unit of text in an HTML document. A paragraph is enclosed in HTML by the <p> opening and closing tags. Browsers visually separate paragraphs from other text with spacing above and below.

Language

A set of rules describing how to write HTML. A valid HTML document must follow the HTML language rules.

rowspans, colspan

A single table cell occupies a single row and column by default, but a cell may span multiple columns or multiple rows using the colspan and _______ attributes. The ______ and rowspan attributes apply to <td> and <th> tags.

If <h1> text appears too big, <h2> or <h3> tags can be used to decrease the text size.

False.A heading tag is used to indicate the title and level of a section and not the formatting of section headings. The visual appearance of the heading tags can be changed.

Reasons for alt attribute: support assistive technology

Software, such as page readers, help users with vision or cognitive impairments. Page reader software reads the alt attribute text out loud for an image.

Void element

an element that only needs an opening tag. Other void elements include <img> for displaying an image and <input> for obtaining user input.

The <mark> tag denotes

content that is important and should be semantically highlighted and is rendered with a yellow background by default. Ex: Remember to mark your answers in the <mark>box</mark>. yields: Remember to mark your answers in the box

block tags

content tries to fill the width of the tag's parent container and can contain other block tags, inline tags, and text. Block tags include headings, tables, and paragraphs. Some block tags cannot be contained within certain other block tags when the semantics are unclear. Ex: The <p> tag cannot contain another <p> tag. A block tag is typically displayed starting and ending on new lines. Ex: The <ol> tag is a block tag that fills the entire width of the parent container, and each ordered list starts on a new line separate from previous and following blocks.

Acting the id attribute

creates a fragment identifier, thus permitting URLs to link directly to that location in the document. Ex: The following HTML has a heading with the fragment identifier "Ch1" and two paragraphs with the fragment identifiers "Ch1p1" and "Ch1p2".

anchor tag <a>

defines a hyperlink in a web page. A hyperlink, or link, specifies where other information is located and what action the web browser should perform when a user clicks the hyperlink. A hyperlink action may tell the web browser to go to another web page, to go to a location in the same web page, to download a file, or to send an email.

A table caption

defines a short descriptive text for a table. The caption is surrounded by the <caption> opening and closing tags and must immediately follow the opening table tag. Usually, a web browser renders the table caption centered above the table.

fragment

document by adding a hash tag and a fragment identifier at the end of the URL. Ex: https://en.wikipedia.org/wiki/Computer_science#History refers to the "History" section of the "Computer_science" page on Wikipedia.

The <em> tags indicates:

emphasized text, such as text having an emphasized pronunciation when spoken, and is italicized by default

common error with paragraphs

forgetting the closing </p> tag, or trying to put a paragraph inside of another paragraph. The web browser might render nested <p> tags visually correct, but an HTML validator will generate a non-visible error

Reasons for alt attribute:Handle broken image URLs

he image cannot be loaded from the specified location. Web browsers may fail to load images because the URL specified by the src attribute is invalid or the image file format is not supported.

The HTML acronym highlights the three main characteristics of web pages:

hypertext, markup, language

tags

indicate formatting, links, or other items.a markup instruction identified by <, a tag name, and a

Link

n a web page is text that can be clicked to jump to another web page. Ex: Click here to be taken to an interesting web page. Links were a central motivation for inventing the web in the first place.

Is this a valid HTML link? <a "http://cnn.com"> CNN </a>

not valid. Missing this part: href=

src attribute

specifies the URL location of the image file to display.

World Wide Web Consortium (W3C)

the official organization that defines web standards, including HTML and CSS.

Standards mode

uses the HTML5 standard.

Is this a valid HTML link? <a href="http://cnn.com"> News </a>

valid

Is this a valid HTML link? <a href="https://www.youtube.com/watch?v=uu7XCEMdSHg"> News </a>

valid

<p>We changed the <strong><em>font</strong></em> in this paragraph.</p>

A tag opened inside another must be closed before the outside tag is closed: <strong><em>font</em></strong>

To copy the functionality of another web page found on the Internet, just copy the HTML from the view source page.

False. Although copying and pasting may create an identical page structure, the web page may not function identically because the copied page may be missing the images, CSS, and JavaScript necessary for the page to function properly. Also, copying a web page's contents likely violates copyright law.

<h1>This is a chapter heading

Invalid. The chapter heading is missing the closing </h1> tag.

<meta charset="UTF-8">

Tag that specifies the character encoding used in the document. The <meta charset="UTF-8"> tag appears at the beginning of the <html> tag and specifies how characters are represented in the the rest of the document .

hypertext

Text that contains connections to other documents. The connections to other documents are called hyperlinks.

Every HTML5 document uses the following

The <!DOCTYPE html> declaration instructs the web browser about what type of document follows. 1. The <html> opening and closing tags enclose everything but the <!DOCTYPE html> declaration . 2. The <meta> tag specifies metadata, which is data that describes the document's data. <meta charset="UTF-8"> is a required meta tag describing how characters are represented in the HTML document. Additional <meta> tags may be used to indicate when the document was saved, who the author is, what language the page is written in, etc. 3. The <title> opening and closing tags enclose the name of the document. 4. The title is usually displayed in the titlebar of the browser, is used by search engines, and is used for bookmarking. 5. The <body> opening and closing tags enclose all elements and content to be rendered in the browser.

Web browsers support three possible image formats

The JPEG (Joint Photographic Experts Group) image format is commonly used for digital photographs. The PNG (Portable Network Graphics) image format is commonly used for line art and screenshots or images requiring transparency. The GIF (Graphics Interchange Format) image format is commonly used for simple animated images.

Reasons for alt attribute: pass html validation

The alt attribute is required. Validators will generate an error if the alt attribute is missing, except under special circumstances. Generating valid HTML documents is important because all web browsers agree on how the documents should be processed. Invalid documents are processed differently by each web browser. Correct

To see how a web page is constructed, a user can view the page source in the browser.

True. View source will show the document loaded by the browser.

UFT-8

a common character encoding that describes characters used by most of the world's languages. UTF-8 even includes fictional languages (e.g., Klingon, elvish ) and emoji (e.g., 😀, ✈ ) The <head> tag is traditionally used to contain the document title, document metadata, and various other elements that are typically not displayed. In HTML5, the <head> tag is optional.

nested list

a list within a list item of another list. The entire nested list is indented and uses a different bullet.

ordered list

a sequenced collection of items, usually indented and shown using numbers or letters, surrounded by the <ol> opening and closing tags. As with an unordered list, each list item is surrounded by <li> opening and closing tags.

element

a single HTML structure. They are represented with HTML tags

<cite> tag denotes

a title, such a book or song title, and is italicized by default. Ex: <cite>Spaceballs</cite> is a parody of the <cite>Star Wars</cite> trilogy. yields: Spaceballs is a parody of the Star Wars trilogy.

A tag attribute:

a value that provides additional information about a particular tag and is included after the tag name but before the > in the tag. Each attribute has a name and a value, specified using the form name="value". Ex: <meta charset="UTF-8"> has an attribute named charset with value "UTF-8".

<img>

ag displays an image in a web page. The <img> tag does not enclose any content and consequently does not have a closing tag. The image tag contains two attributes

non-breaking character

an inter-word character that permits treating the words on both sides to be one word. A non-breaking hyphen, &#8209;, looks like a regular hyphen, but acts like a normal character in the middle of a word. A non-breaking space, &nbsp;, looks like a single space, but acts like a normal character in the middle of a word.

Whitespace

character is an unprinted character such as the spaces between words and lines of text. Browsers treat all sequences of whitespace as a single space between non-whitespace characters. Ex: The three spaces in the HTML "hello there" will be displayed with a single space "hello there". Whitespace characters include spaces, tabs, and newlines. So, a browser treats multiple lines of text as a single line.

HTML validator

checks that an HTML document conforms to the standard. Good practice involves using tools like the W3C Markup Validator to check document conformance.

entity

mechanism for writing special characters or symbols in HTML, such as mathematical symbols, characters in most languages, and many other symbols. Entities can be specified using the three formats shown in the accompanying table:

table

n HTML structure surrounded by the <table> opening and closing tags that allows data to be organized in rows and columns. A cell is a location in the table at a specific row and column. A table row is surrounded by the <tr> opening and closing tags and contains all the cells within a table row. The <th> opening and closing tags create a new table cell containing table header information about the data. Usually, the browser will display the table headers centered with a bold font. The <td> opening and closing tags create a new table cell containing a table datum. Every cell in a table is contained within a table row.

deprecated

part of a language that is officially discouraged because newer or better features exist, or because the deprecated feature is no longer considered safe. Ex: The <center> tag is an officially deprecated pre-HTML5 feature. W3C documentation states that <center> should not be used.

Heading

provides a title for a section of content. Headings are visually separated from the other text by extra spacing and are displayed with a different appearance. Heading tags exist for the first six levels of nested sections. The first level heading is surrounded by the <h1> opening and closing tags, and is appropriate for chapter titles. The second level heading is surrounded <h2> tags, and is appropriate for subchapter titles. The third through sixth level headings tags are <h3>, <h4>, <h5>, and <h6>. Selecting an appropriate heading is helpful for uses such as assisting visually impaired persons to navigate a web page. The <h4> through <h6> tags are rarely used except in legal or academic documents that contain sections within sections within sections. A good practice is to wrap each subsection with <section> tags instead of relying on heading tags starting new implicit sections, and to label each section with a heading.

aspect ratio

ratio of the image width to the image height. The aspect ratio is written as width:height. Ex: An image 500 pixels wide and 250 pixels high has an aspect ratio of 500:250, which simplifies to 2:1. If an image has a different aspect ratio than the image tag's width and height attributes, the browser will distort the image to match the specified attribute values .

HTML5

the fifth major revision of the HTML standard and is recommended for use by the W3C. HTML5 contains many new and useful features, so most new web page development uses HTML5.


Set pelajaran terkait

Solving Systems of Linear Inequalities

View Set

Week 4 Retention Quiz Chapters 3 & 11

View Set

Materials of Manufacturing Exam Two

View Set