Question

In: Computer Science

What does the HTML tag designate in an HTML document?

What does the HTML tag designate in an HTML document?

Solutions

Expert Solution

HTML tags are hidden keywords that define how the web browser must format and display contents into a web page. Most tags have two parts: an opening and a closing part. There are a list of tags used in HTML.

1. New paragraph

The <p> tag is used to define a paragraph in HTML. Most browsers will display text even if you forget to close the paragraph tag.

The usage of <p> tag:

<p> ... </p>

Executable code:

<! DOCTYPE html>

<html>

<head> </head>

<body>

<p> This is a sample paragraph </p>

</body>

</html>

2. Personal Data

The <details> tag is used to specify additional details that the user can view or hide accordingly.

The usage of <details> tag:

<details>

<summary> ... </summary>

<p> ... </p>

</details>

Executable code:

<! DOCTYPE html>

<html>

<head> </head>

<body>

<details open>

<summary> Personal details </summary>

<p> the personal data is visible in the web site </p>

</details>

3. Print command

The print() method prints the contents of the current window.

The usage of print() method:

<script>

windows.print();

</script>

Executable code:

<! DOCTYPE html>

<html>

<head> </head>

<body>

<button onclick = "myfunction()">Print</button>

<script>

function myfunction(){

windows.print();

}

</script>

</body>

</html>

4. Show photo

The <img> tag is empty and does not have closing tag. It contains only attributes.

The src specifies the url of the image. You can use the image name (for saved images) or the complete url.

The usage of <img> tag:

<img src = "image1.jpg">

Executable code:

<! DOCTYPE html>

<html>

<head> </head>

<body>

<img src="image1.jpg">

</body>

</html>


Related Solutions

CSS Write a document wide style block (include the correct HTML tag) to set all <p>...
CSS Write a document wide style block (include the correct HTML tag) to set all <p> tags to be double spaced and justified (not ragged left / right text)
lab3 exercise 5 html <!DOCTYPE html> <!-- Webpage HTML document for Lab 03.   Author: Amir H...
lab3 exercise 5 html <!DOCTYPE html> <!-- Webpage HTML document for Lab 03.   Author: Amir H Chinaei   For: EECS 1012, York University, Lassonde School of Engineering --> <html lang="En"> <head>   <meta charset="UTF-8">   <title> EECS1012: Lab 3 - My Kit </title>   <!-- in Ex1, add a link tag here to connect it to the css file -->   <link rel="stylesheet" type="text/css" href="myLearningKit_ex2.css">   <script src="myLearningKit_ex4.js"></script>      <!-- in Ex2, add a script tag here to connect it to the js file -->   ...
This should be done in JavaScript. The HTML file should only contain an empty main tag....
This should be done in JavaScript. The HTML file should only contain an empty main tag. All other HTML on the page should be created with JavaScript. The JavaScript file should be a separate file.   Make an empty HTML file, put an empty main tag inside the body. In your JavaScript, use querySelector to get a reference to the main tag and save it in a variable named main. Look up three good jokes and store them as separate variables...
2. The HTML document on the following page consists of JavaScript code executed when the document...
2. The HTML document on the following page consists of JavaScript code executed when the document is loaded. It prompts the user for his/her name (first and last names) then outputs the greeting “Hello Mr. _____!” or “Hello Ms. _____!” (where _____ is the user’s last name) depending on whether the first name is recognized as a male name. (In the code, only three male names are checked; a realistic program would check many more names.) We allow for the...
Write an HTML document to provide a form that collects familynames and telephonenumbers. The...
Write an HTML document to provide a form that collects family names and telephone numbers. The family name should start with a capital letter, followed by at least one lowercase letter, and not include any spaces or any other characters, and the length should not be more than 30 characters. The phone numbers must be in the format (ddd)-ddd-dddd. Write a PHP script that checks the submitted last name and the telephone number to be sure that they conform to...
1. An HTML document that’s generated by a web application is a ________________________ web page. 2....
1. An HTML document that’s generated by a web application is a ________________________ web page. 2. An easy way to log the progress of an application in Chrome’s Console panel is to insert __________________ methods at critical points in the code. 3. The childNodes property of a DOM object returns a/an ______________________ of the child nodes for that object. 4. The ___________________ method of an array can be used to concatenate the elements of the array into a single string.​...
What is HTML?
What is HTML?
what does it mean when a document or information is privileged?
what does it mean when a document or information is privileged?
What is the "current cost of an RFID tag "?
What is the "current cost of an RFID tag "?
What is the “current cost of an RFID tag”?
What is the “current cost of an RFID tag”?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT