Found 10711 Articles for Web Development

How to create JavaScript objects using new operator?

Krantik Chavan
Updated on 16-Jun-2020 13:39:41

222 Views

The new keyword in JavaScript is the new operator, which creates an instance of a user-defined object type.ExampleYou can try to run the following code to create JavaScript objects using new operator −Live Demo                          var dept = new Object();          dept.employee = "Amit";          dept.department = "Technical";          dept.technology ="Java";          document.getElementById("test").innerHTML =          dept.employee + " is working on " + dept.technology + " technology.";           OutputAmit is working on Java technology.

How to mark inserted text in HTML?

Lokesh Badavath
Updated on 11-Nov-2022 09:13:01

274 Views

The to be inserted is marked with an underline. Underlined text is used to help draw attention to the text. We use the tag, to mark a text in HTML. It represents a text in a different style from another text in the content of the web page. We can also use the style attribute, to mark a text in HTML. The style attribute specifies an inline style for an element. This attribute is used inside the HTML tag, with the CSS property text-decoration property. Syntax Following is the syntax for the tag. The text to be ... Read More

How to set table width in HTML?

Lokesh Badavath
Updated on 21-Oct-2023 13:42:41

23K+ Views

We use inline style attribute, to set the table width in HTML. The attribute is used within the HTML tag, with the CSS property width to set table width. Syntax Following is the syntax to set table width in HTML. … Example Following is the example program to set table width in HTML. DOCTYPE html> table { border:1px solid black; padding: 10px; ... Read More

How to mark strikethrough text in HTML?

Sai Subramanyam
Updated on 29-Dec-2021 07:28:48

9K+ Views

To mark strikethrough text in HTML, use the … tag. It renders a strikethrough text. HTML deprecated this tag and it shouldn’t be used in HTML5. As an alternative, use the CSS text-decoration property.To use the CSS property, use the style attribute. The style attribute specifies an inline style for an element. The attribute can be used with the HTML tag. Just keep in mind, HTML5 does not support the tag, so the CSS style should be used.ExampleYou can try to run the following code to mark strikethrough text in HTML HTML Strikethrough text ... Read More

How to mark deleted text in HTML?

Lokesh Badavath
Updated on 11-Nov-2022 09:10:46

1K+ Views

We use tag, to delete a text in HTML. This tag mark strike on the text which is to be delete from the document. We can also use the style attribute, to strike a text in HTML. The style attribute specifies an inline style for an element. This attribute is used inside the HTML tag, with the CSS property text-decoration property. Syntax Following is the syntax to delete a text in HTML. The content to be deleted Example Following is the example program to delete a text in HTML. DOCTYPE html> ... Read More

How to underline a text in HTML?

Lokesh Badavath
Updated on 02-Sep-2023 10:06:31

69K+ Views

Underlined text is used to help draw attention to the text. We use the tag, to underline a text in HTML. It represents a text in a different style from another text in the content of the web page. We can also use the style attribute, to underline a text in HTML. The style attribute specifies an inline style for an element. This attribute is used inside the HTML tag, with the CSS property text-decoration property. Syntax Following is the syntax to underline a text in HTML. The content to be underlined Example Following is the ... Read More

How to create table rows & columns in HTML?

Lokesh Badavath
Updated on 18-Nov-2022 10:59:27

19K+ Views

HTML tables allow us to arrange data into rows and columns on the web page. We use the tag, to create table in HTML. A table consist of rows and columns. Table heading, row and column and table data can be set using one or more , , and elements. A table row is defined by the tag. For table rows and columns, we use , tags respectively inside the … tag. Example Following is the example program to create table rows and column. DOCTYPE html> ... Read More

How to use small font in HTML?

karthikeya Boyini
Updated on 22-Dec-2021 09:43:02

5K+ Views

To set the small font in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML tag, with the CSS property font-size. HTML5 do not support the tag, so the CSS style is used to add font size.Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML tag or external style sheet.ExampleYou can try the following code to add font smaller than the default font in an HTML page     ... Read More

How do I hide an element when printing a web page?

Johar Ali
Updated on 24-Feb-2020 04:57:51

5K+ Views

To hide the element, add “display:none” to the element with CSS. @media print {    .noprint {       visibility: hidden;    } } In addition, add the element, which you want to hide inside the −    Add here the element, which you want to hide.

How to create table header in HTML?

Lokesh Badavath
Updated on 18-Nov-2022 10:55:33

8K+ Views

To create table header in HTML, use the … tag. A table header tag is surrounded by the table row …. The tag is surrounded by the tag. A table consist of a rows and columns, which can be set using one or more , , and elements. Use the style attribute to add CSS properties for adding a border to the table. A table row is defined by the tag. To create table header, use the tag. Just keep in mind that you can only have a single heading in a table. Syntax ... Read More

Advertisements