HTML DOM TableData rowSpan Property

AmitDiwan
Updated on 20-Sep-2019 09:20:52

150 Views

The HTML DOM TableData rowSpan property returns and modify the value of rowspan attribute of a table in an HTML document.SyntaxFollowing is the syntax −1. Returning rowSpanobject.rowSpan2. Adding rowSpanobject.rowSpan = “number”Let us see an example of rowSpan property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;       width: 400px;    }    .btn {       background: #db133a;       border: none;       height: ... Read More

HTML DOM Table tHead Property

AmitDiwan
Updated on 20-Sep-2019 09:10:08

74 Views

The HTML DOM table tHead property returns the element of the table in an HTML document.SyntaxFollowing is the syntax −object.tHeadLet us see an example of HTML DOM table tHead property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;    }    caption {       color: #db133a;    }    .btn {       background: #db133a;       border: none;       height: 2rem;   ... Read More

HTML DOM Table tFoot Property

AmitDiwan
Updated on 20-Sep-2019 09:06:28

51 Views

The HTML DOM table tFoot property returns the element of the table in an HTML document.SyntaxFollowing is the syntax −object.tFootLet us see an example of HTML DOM table tFoot property −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;   ... Read More

HTML DOM Table tBodies Collection

AmitDiwan
Updated on 20-Sep-2019 09:02:27

73 Views

The HTML DOM table tBodies Collection returns a collection of all elements in a table in an HTML document.SyntaxFollowing is the syntax −object.tBodiesProperties of tBodies CollectionPropertyExplanationlengthIt returns the number of elements in the collection in an HTML documentProperties of tBodies CollectionMethodExplanation[index]It returns the specified index element from the collection.item(index)It returns the specified index element from the collection.namedItem(id)It returns the specified id element from the collection.Let us see an example of HTML DOM table tBodies Collection −Example Live Demo    body {       color: #000;       background: lightblue;       ... Read More

HTML DOM Table rows Collection

AmitDiwan
Updated on 20-Sep-2019 08:55:43

255 Views

The HTML DOM table rows Collection returns a collection of all elements of a table in an HTML document.SyntaxFollowing is the syntax −object.rowsProperties of rows Collectionelements in the collection in an HTML document.PropertyExplanationlengthIt returns the number of elements in the collection in an HTML document.Methods of rows Collectionelement from the collection element from the collection. element from the collectionMethodExplanation[index]It returns the specified index element from the collection.item(index) It returns the specified index element from the collection.namedItem(id)It returns the specified id element from the collectionLet us see an example of HTML DOM table rows Collection −Example Live ... Read More

HTML DOM Table deleteRow() Method

AmitDiwan
Updated on 20-Sep-2019 08:44:25

57 Views

The HTML DOM table deleteRow() method deletes a element from the table in an HTML document.SyntaxFollowing is the syntax −object.deleteRow(index)Here, index represent a number that specifies the position of the row to delete.Let us see an example of HTML DOM table deleteRow() method −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;    }    .btn {       background: #db133a;       border: none;       ... Read More

HTML DOM Table deleteTHead() Method

AmitDiwan
Updated on 20-Sep-2019 08:40:50

41 Views

The HTML DOM table deleteTHead() method delete the element from the table in an HTML document.SyntaxFollowing is the syntax −object.deleteTHead()Let us see an example of HTML DOM table deleteTHead() method −Example Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;       text-align: center;    }    table {       margin: 2rem auto;    }    caption {       color: #db133a;    }    .btn {       background: #db133a;       border: none;       height: 2rem;   ... Read More

Program for Celsius To Fahrenheit conversion in C++

Sunidhi Bansal
Updated on 20-Sep-2019 08:30:20

555 Views

Given with temperature ‘n’ in Celsius the challenge is to convert the given temperature to Fahrenheit and display it.ExampleInput 1-: 100.00    Output -: 212.00 Input 2-: -40    Output-: -40For converting the temperature from Celsius to Fahrenheit there is a formula which is given belowT(°F) = T(°C) × 9/5 + 32Where, T(°C) is temperature in Celsius and T(°F) is temperature in FahrenheitApproach used below is as followsInput temperature in a float variable let’s say CelsiusApply the formula to convert the temperature into FahrenheitPrint FahrenheitALGORITHMStart Step 1 -> Declare a function to convert Celsius to Fahrenheit    void cal(float cel) ... Read More

Check if a string contains only alphabets in Java using ASCII values

AmitDiwan
Updated on 20-Sep-2019 08:29:26

363 Views

Let’s say we have set out inut string in myStr variable. Now loop through until the length of string and check for alphabets with ASCII values −for (int i = 0; i < myStr.length(); i++) {    char c = myStr.charAt(i);    if (!(c >= 'A' && c = 'a' && c = 'A' && c = 'a' && c

Check if a string contains only alphabets in Java using Regex

AmitDiwan
Updated on 20-Sep-2019 08:24:32

784 Views

At first, convert the string into character array. Here, name is our string −char[] ch = name.toCharArray();Now, loop through and find whether the string contains only alphabets or not. Here, we are checking for not equal to a letter for every character in the string −for (char c : ch) {    if(!Character.isLetter(c)) {       return false;    }Following is an example to check if a string contains only alphabets using RegexExample Live Demopublic class Main {    public static boolean checkAlphabet(String name) {       char[] ch = name.toCharArray();       for (char c : ch) { ... Read More

Advertisements