HTML & HTML5

Ace your homework & exams now with Quizwiz!

What are the various tags provided for better structuring in HTML5?

The various tags provided for better structuring in HTML 5 are: 1) <article> - This tag defines an article. 2) <aside> - It defines content other than the page content. 3) <bdi> - This tag isolates a part of text for formatting in a different direction from other text. 4) <command> - It defines a command button to be invoked by the user. 5) <details> - It defines additional details that can be viewed or hidden by the user. 6) <dialog> - It defines a dialog box. 7) <figure> - This tag specifies content like illustrations, diagrams, photos, code listings, etc. 8) <figcaption> - It is used to provide a caption for a <figure> element 9) <footer> - This tag defines a footer for a document or section 10) <header> - This tag is used to define a header for a document or section 11) <hgroup> - When there are multiple levels in a heading, it groups a set of <h1> to <h6> elements.

How do you create a text on a webpage that will allow you to send an email when clicked?

To change a text into a clickable link to send email, use the mailto command within the href tag. The format is as follows: <A HREF="mailto:youremailaddress">text to be clicked</A>

How do you create a link that will connect to another web page when clicked?

To create hyperlinks, or links that connect to another web page, use the href tag. The general format for this is: <a href="site">text</a> Replace "site" with the actual page url that is supposed to be linked to when the text is clicked.

How do you create multicolored text in a webpage?

To create text with different colors, use the <font color="color">...</font> tags for every character that you want to apply a color. You can use this tag combination as many times as needed, surrounding a single character or an entire word.

How do you make a picture into a background image of a web page?

To do this, place a tag code after the </head> tag as follows: <body background = "image.gif"> Replace image.gif with the name of your image file. This will take the picture and make it the background image of your web page.

How do you insert a copyright symbol on a browser page?

To insert the copyright symbol, you need to type &copy; or & #169; in an HTML file.

HTML5 provides drag and drop facility. How do you make an image draggable?

To make an image draggable, the draggable attribute is set to true: <img draggable="true">

What is the use of using alternative text in image mapping?

When you use image maps, it can easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put a descriptive text on each hotspot link.

What is the advantage of collapsing white space?

White spaces are blank sequence of space characters, which is actually treated as a single space character in html. Because the browser collapses multiple space into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the html code into a much more readable format.

What is HTML5 Web Storage?

With HTML5, it is possible for the web pages to store the data locally in the user's browser. This web storage is much faster and secured than the cookies. Also, a larger amount of data can be stored without causing any adverse effect to the performance of the website. The data here is not included with every server request. It is used ONLY when it is asked for. It is only that particular web page that can access the data stored by itself.

What bullet types are available?

With ordered lists, you can select to use a number of different list types including alphabetical and Roman numerals. The type attribute for unordered lists can be set to disc, square, or circle.

Do older html files work on newer browsers?

Yes, older html files are compliant to the HTML standard. Most older files work on the newer browsers, though some features may not work.

Can several selectors with class names be grouped together?

You can define several selectors with the same style definition by separating them with commas. This same technique also works for selectors with class names.

What are some of the common lists that can be used when designing a page?

You can insert any or a combination of the following list types: - ordered list - unordered list - definition list - menu list - directory list Each of this list types makes use of a different tag set to compose

Is it possible to set specific colors for table borders?

You can specify a border color using style sheets, but the colors for a table that does not use style sheets will be the same as the text color.

Which method is used to draw an image on the canvas?

drawImage(image,x,y) method is used to draw an image on the canvas.

What is a Canvas? What is the default border size of a canvas?

- Canvas is a rectangular area on a HTML page, specified with the tag <canvas>. - By default, a canvas has no border. To get a border on the canvas, a style attribute is required to be used.

Tell us something about the new <canvas> element.

- The new <canvas> element provided by HTML5 aids in 2D drawing. - It uses the tag <canvas>. - This tag helps in drawing graphics through scripting usually JavaScript.

Can HTML5 get the geographical position of a user?

- Yes, HTML5 can get the location of a user with the use of Geolocation API. - Use getCurrentPosition() method to get the user's current position.

Differentiate between localStorage and sessionStorage objects.

- localStorage object stores the data without an expiry date while sessionStorage object stores the data only for one session. - With localStorage object, data will not be deleted when the browser window is closed while the data is deleted when the browser window closes with sessionStorage objects.

What are the another tags provided for better structuring in HTML5?

1) <mark> - It defines highlighted text. 2) <meter> - It defines a scalar measurement within a known range. 3) <nav> - It defines links for navigation. 4) <progress> - This tag exhibits the progress of a task. 5) <ruby> - It defines a ruby annotation for East Asian typography. 6) <rt> - It defines an explanation/pronunciation of characters for East Asian typography. 7) <rp> - This tag tells the system what to display in browsers that do not support ruby annotations. 8) <section> - It defines a section in a document. 9) <summary> - It provides a visible heading for a <details> element. 10) <time> - This tag defines a date/time. 11) <wbr> - This tag defines a line-break.

What are the new attributes provided in HTML5 for <form>?

1) autocomplete - It specifies if a form or input field should have autocomplete as on or off. - If autocomplete is on, the browser is able to fill the values based on the values filled by the user earlier. - autocomplete works for following input types: text, search, url, tel, email, password, datepickers, range, and color. 2) novalidate - This is a boolean attribute. - When present, it signifies that the form-data should not be validated when submitted.

What is a Web Worker?

1. A web worker is a JavaScript which runs in the background. It exists in external files. 2. It is independent of other scripts and does not affect the performance of the page. 3. Web workers are usually used for CPU intensive tasks.

What is SVG?

1. SVG is the abbreviation for Scalable Vector Graphics and is recommended by W3C. 2. It is used to define vector-based graphics for the Web. 3. The graphics are defined in XML format. 4. An important quality of SVG graphics is that their quality is maintained even when they are zoomed or resized. 5. All the element and attributes of SVG files can be animated.

Which elements of HTML 4.01 are no more a part of HTML5?

<acronym> <applet> <basefont> <big> <center> <dir> <font> <frame> <frameset> <noframes> <strike> <tt>

What are the various elements provided by HTML5 for media content?

<audio> and <video> elements are provided by HTML5 for media playback. The tags used are: 1) <audio> - It defines sound content. 2) <video> - It defines a video or a movie. 3) <source> - This tag defines the multiple media resources for <video> and <audio>. 4) <embed> - It provides a container for an external application or interactive content. 5) <track> - It defines text tracks for <video> and <audio>.

Write a HTML table tag sequence that outputs the following: 50 pcs 100 500 10 pcs 5 50

<table> <tr> <td>50 pcs</td> <td>100</td> <td>500</td> </tr> <tr> <td>10 pcs</td> <td>5</td> <td>50</td> </tr> </table>

What is a Manifest file?

A Manifest file is a simple text file that tells the browser what to cache and what not to cache. There are three sections of a Manifest file: 1) CACHE MANIFEST - Files listed here are cached after they are downloaded for the first time. 2) NETWORK - Files listed here require a connection to the server, and are never cached. 3) FALLBACK - Files listed here specify fallback pages if a page is inaccessible.

What is a marquee?

A marquee allows you to put a scrolling text in a web page. To do this, place whatever text you want to appear scrolling within the <marquee> and </marquee> tags.

What is the advantage of grouping several checkboxes together?

Although checkboxes don't affect one another, grouping checkboxes together helps to organize them. Checkbox buttons can have their own name and do not need to belong to a group. A single web page can have many different groups of checkboxes.

Do <th> tags always need to come at the start of a row or column?

Any <tr> tag can be changed to a <th> tag. This causes the text contained within the <th> tag to be displayed as bold in the browser. Although <th> tags are mainly used for headings, they do not need to be used exclusively for headings.

What are applets?

Applets are small programs that can be embedded within web pages to perform some specific functionality, such as computations, animations, and information processing. Applets are written using the Java language.

Are there instances where text will appear outside of the browser?

By default, the text is wrapped to appear within the browser window. However, if the text is part of a table cell with a defined width, the text could extend beyond the browser window.

Is there any way to keep list elements straight in an html file?

By using indents, you can keep the list elements straight. If you indent each subnested list in further than the parent list that contains it, you can at a glance determine the various lists and the elements that it contains.

How do you insert a comment in html?

Comments in html begins with "<!-"nd ends with "->". For example: <!-- A SAMPLE COMMENT -->

What are tags?

Content is placed in between HTML tags in order to properly format it. It makes use of the less than symbol (<) and the greater than symbol (>). A slash symbol is also used as a closing tag. For example: <strong>sample</strong>

What is the relationship between the border and rule attributes?

Default cell borders, with a thickness of 1 pixel, are automatically added between cells if the border attribute is set to a nonzero value. Likewise, If the border attribute is not included, a default 1-pixel border appears if the rules attribute is added to the <table> tag.

If you see a web address on a magazine, to which web page does it point?

Every web page on the web can have a separate web address. Most of these addresses are relative to the top-most web page. The published web address that appears within magazines typically points this top-most page. From this top level page, you can access all other pages within the web site.

Which JavaScript objects are not accessible to web worker?

Following JavaScript objects are not accessible to web worker: 1. The window object 2. The document object 3. The parent object

What are the new input types provided by HTML 5 for forms?

Following are the important, new input types for forms provided by HTML 5: 1. color - Used for fields that should contain colour. 2. date - Allows the user to select a date. 3. datetime - Allows the user to select a date and time (with time zone). 4. datetime-local - Allows the user to select a date and time (without time zone). 5. email - Used for input fields that should contain an e-mail address. 6. month - Allows the user to select a month and year. 7. number - Used for input fields that should contain a numeric value. Restrictions on type of numbers accepted can be set. 8. range - Used for input fields that should contain a value from a range of numbers. Restrictions on type of numbers accepted can be set here as well. 9. search - Used for search fields. 10. tel - Defines a field for entering a telephone number. 11. time - Allows the user to select a time. 12. url - Used for input fields that should contain a URL address. 13. week - Allows the user to select a week and year.

What are the advantages of SVG over other image format like JPEG or GIF?

Following are the main advantages of using SVG over other image formats: - It is possible to scale the SVG images. - They can be created and edited with any text editor. - The print quality of these image is high at any resolution. - It is possible to zoom the SVG images without any degradation in the quality. - SVG images can be searched, indexed, scripted, and compressed.

What are the new attributes provided in HTML5 for <input>?

Following are the new attributes provided in HTML5 for <input> 1) autofocus: - This is a Boolean attribute. - When present, it means that an <input> element should automatically get focus when the page is loaded. 2) form: - This attribute specifies one or more forms an <input> element belongs to. 3) formaction: - This attribute specifies the URL of a file that will process the input control when the form is submitted. - This attribute is used with type="submit" and type="image". - It overrides the action attribute of the <form> element. 4) formenctype: - This attribute specifies how the form-data should be encoded when submitting it to the server. - It is used with type="submit" and type="image". - It overrides the enctype attribute of the <form> element. 5) formmethod: - It defines the HTTP method for sending form-data to the action URL. - It is used with type="submit" and type="image". - It overrides the method attribute of the <form> element. 6) formnovalidate: - It is a boolean attribute. - It specifies that the <input> element should not be validated when submitted. - It is used with type="submit". - It overrides the novalidate attribute of the <form> element. 7) formtarget: - It specifies a name or a keyword that indicates where to display the response that is received after submitting the form. - It is used with type="submit" and type="image". 8) height and width: - It specifies the height and width of an <input> element. - It is used only with <input type="image"> 9) list: - It refers to a <datalist> element which contains pre-defined options for an <input> element. 10) min and max: - It specifies the minimum and maximum value for an <input> element. - It works with the following input types: number, range, date, datetime, datetime-local, month, time and week. 11) Multiple: - It is a boolean attribute. - It specifies that the user is allowed to enter more than one value in the <input> element. - It works with the following input types: email and file. 12) pattern: - It specifies a regular expression that the <input> element's value is checked against. - It works with the following input types: text, search, url, tel, email, and password. 13) placeholder: - It specifies a short hint that describes the expected value of an input field. - It works with the following input types: text, search, url, tel, email, and password. 14) required: - It is a boolean attribute. - It specifies that an input field must be filled out before submitting the form. 15) step: - It specifies the legal number intervals for an <input> element. - It works with the following input types: number, range, date, datetime, datetime-local, month, time and week.

Which methods are used to draw a straight line on a Canvas?

Following methods are used to draw a straight line on a Canvas: 1. moveTo(x,y) - It defines the starting co-ordinates of the line. 2. lineTo(x,y) - It defines the ending co-ordinates of the line. 3. The actual line is drawn with the help of a method like stroke()

When is it appropriate to use frames?

Frames can make navigating a site much easier. If the main links to the site are located in a frame that appears at the top or along the edge of the browser, the content for those links can be displayed in the remainder of the browser window.

What are gradients in Canvas used for? What are their different types?

Gradients in canvas are used to fill rectangles, circles, lines etc. The gradients in Canvas are of two types: 1. createLinearGradient(x,y,x1,y1) - It creates a linear gradient 2. createRadialGradient(x,y,r,x1,y1,r1) - It creates a radial/circular gradient

What is HTML?

HTML is short for HyperText Markup Language, and is the language of the World Wide Web. It is the standard text formatting language used for creating and displaying pages on the Web. HTML documents are made up of two things: the content and the tags that formats it for proper display on pages.

What are the audio tags provided by HTML5?

HTML5 provides following audio tags: <audio> - Defines sound content <source> - Defines multiple media resources for media elements, such as <video> and <audio>

What is the hierarchy that is being followed when it comes to style sheets?

If a single selector includes three different style definitions, the definition that is closest to the actual tag takes precedence. Inline style takes priority over embedded style sheets, which takes priority over external style sheets.

What happens if the list-style-type property is used on a non-list element like a paragraph?

If the list-style-type property is used on a non-list element like a paragraph, the property will be ignored and have no effect on the paragraph.

What if there is no text between the tags or if a text was omitted by mistake? Will it affect the display of the html file?

If there is no text between the tags, then there is nothing to format, so no formatting will appear. Some tags, especially tags without a closing tag like the <img> tag, do not require any text between them.

What will happen if you overlap sets of tags?

If two sets of html tags are overlapped, only the first tag will be recognized. You will recognize this problem when the text does not display properly on the browser screen.

What happens if you open the external CSS file in a browser?

If you try to open the external CSS file in a browser, the browser cannot open the file, because the file has a different extension. The only way to use an external CSS file is to reference it using <link/> tag within another html document.

What is image map?

Image map lets you link to many different web pages using a single image. You can define shapes in images that you want to make part of an image mapping.

Can I specify fractional weight values such as 670 or 973 for font weight?

Implementation largely depends on the browser, but the standard does not support fractional weight values. Acceptable values must end with two zeroes.

If the user's operating system does not support the needed character, how can the symbol be represented?

In cases wherein their operating system does not support a particular character, it is still possible to display that character by showing it as an image instead.

How do you create links to sections within the same page?

Links can be created using the <a> tag, with referencing through the use of the number (#) symbol. For example, you can have one line as <a href="#topmost">BACK TO TOP</a>, which would result in the words "BACK TO TOP" appearing on the webpage and links to a bookmark named topmost. You then create a separate tag command like <a name="topmost"> somewhere on the top of the same webpage so that the user will be linked to that spot when he clicked on "BACK TO TOP".

Does a hyperlink apply to text only?

No, hyperlinks can be used on text as well as images. That means you can convert an image into a link that will allow user to link to another page when clicked. Just surround the image within the <a href=" ">...</a> tag combinations.

Do all HTML tags come in pair?

No, there are single HTML tags that does not need a closing tag. Examples are the <img> tag and <br> tags.

Do all character entities display properly on all systems?

No, there are some character entities that cannot be displayed when the operating system that the browser is running on does not support the characters. When that happens, these characters are displayed as boxes.

Can a single text link point to two different web pages?

No. The <a> tag can accept only a single href attribute, and it can point to only a single web page.

Are <br> tags the only way to separate sections of text?

No. The <br> tag is only one way to separate lines of text. Other tags, like the <p> tag and <blockquote> tag, also separate sections of text.

Can attribute values be set to anything or are there specific values that they accept?

Some attribute values can be set to only predefined values. Other attributes can accept any numerical value that represents the number of pixels for a size.

What are the new features provided in HTML5?

Some of the new features provided in HTML5 are: 1. It provides support for local storage 2. New form controls, like calendar, date, time, email, url, search 3. <canvas> element is provided to facilitate 2D drawing 4. The <video> and <audio> elements are provided for media playback 5. New content-specific elements are provided. For e.g. <article>, <header>, <footer>, <nav>, <section>

Do style sheets limit the number of new style definitions that can be included within the brackets?

Style sheets do not limit the number of style definitions that can be included within the brackets for a given selector. Every new style definition, however, must be separated from the others by a semicolon symbol.

What are style sheets?

Style sheets enable you to build consistent, transportable, and well-defined style templates. These templates can be linked to several different web pages, making it easy to maintain and change the look and feel of all the web pages within a site.

What other ways can be used to align images and wrap text?

Tables can be used to position text and images. Another useful way to wrap text around an image is to use style sheets.

How do you change the number type in the middle of a list?

The <li> tag includes two attributes - type and value. The type attribute can be used to change the numbering type for any list item. The value attribute can change the number index.

What is the concept of Application Cache in HTML5? What are its advantages?

The Application Cache concept introduced by HTML5 means that a web application is cached, and accessible without an internet connection. There are three advantages of Application Cache: 1. Offline browsing - Users can use the application when they're offline 2. Speed - Cached resources load faster 3. Reduced server load - The browser will only download updated/changed resources from the server

What happens if the number of values in the rows or cols attribute doesn't add up to 100 percent?

The browser sizes the frames relative to the total sum of the values. If the cols attribute is set to 100%, 200%, the browser displays two vertical frames with the second being twice as big as the first.

Can you change the color of bullets?

The bullet color is always the same as that of the first character in the list litem. If you surround the <li> and the first character with a set of <font> tags with the color attribute set, the bullet color and the first character will be a different color from the text.

How are active links different from normal links?

The default color for normal and active links is blue. Some browsers recognize an active link when the mouse cursor is placed over that link; others recognize active links when the link has the focus. Those that don't have a mouse cursor over that link is considered a normal link.

What are the limits of the text field size?

The default size for a text field is around 13 characters, but if you include the size attribute, you can set the size value to be as low as 1. The maximum size value will be determined by the browser width. If the size attribute is set to 0, the size will be set to the default size of 13 characters.

What is the difference between the directory and menu lists and the unordered list?

The key differences is that the directory and menu lists do not include attributes for changing the bullet style.

What are the new Form elements made available in HTML5?

The new Form elements in HTML5 provide for a better functionality. The tags provided to carry out these functions are: 1) <datalist> - It specifies a list of options for input controls. These options are pre-defined. 2) <keygen> - This tag defines a key-pair generator field. 3) <output> - It defines the result of a calculation.

Why are there both numerical and named character entity values?

The numerical values are taken from the ASCII values for the various characters, but these can be difficult to remember. Because of this, named character entity values were created to make it easier for web page designers to use.

Differentiate between Canvas and SVG.

The table below shows some important differences between Canvas and SVG: - Canvas is resolution dependent while SVG is not. - Canvas does not provide any support for event handlers while SVG does. - Canvas is suitable for graphic-intensive games while SVG is not suitable for gaming. - Canvas is suitable for small rendering areas while SVG is suitable for large rendering areas like Google maps.


Related study sets

DOMAIN 1 SECURITY AND RISK MANAGEMENT DOMAIN

View Set

History Chapter 13 section 1 and 2

View Set

Chapter 17: The South and the West Transformed, 1865-1900 INquiz

View Set

Elements and their Chemical Symbols

View Set

IBD - Financial Statement Basics

View Set