Seetha has Published 104 Answers

Create strong text in HTML

seetha

seetha

Updated on 27-May-2020 22:01:31

To display strong text, use the <strong> tag. The HTML <strong> tag is used for emphasizing an important text.ExampleYou can try to run the following code to implement <strong> tag in HTML −<!Doctype html> <html>    <head>       <title>HTML strong Tag</title>    </head>    <body>       ... Read More

How do we use a simple drop-down list of items in HTML forms?

seetha

seetha

Updated on 12-May-2020 08:16:56

With HTML, you can create a simple drop-down list of items to get user input in HTML forms. A select box also called drop-down box provides an option to list down various options in the form of drop-down list, from where a user can select one or more options. The ... Read More

Align text and select boxes to the same width with HTML and CSS

seetha

seetha

Updated on 03-Mar-2020 12:42:27

When we set the width and height of an element in CSS then often the element appears bigger than the actual size. This is because by default, the padding and border are added to the element’s width and height and then the element is displayed.The box sizing property includes the ... Read More

Get the HTTP header for the information of the content attribute in HTML

seetha

seetha

Updated on 03-Mar-2020 12:35:54

Use the http-equiv attribute to get the HTTP header for the information of the content attribute in HTML.ExampleYou can try to run the following code to implement http-equiv attribute −<html>    <head>       <title>HTML http-equiv attribute</title>       <meta name = "keywords" content = "HTML, meta tag, metadata" ... Read More

How to specify that the styles only apply to this element's parent element and that element's child elements in HTML?

seetha

seetha

Updated on 03-Mar-2020 11:09:27

Use the scoped attribute to specify that the styles only apply to the parent element and the element’s child elements −Example<!DOCTYPE html> <html>    <head>       <style>          h2 {             color:yellow;          }       </style> ... Read More

Execute a script when the browser starts to work offline in HTML?

seetha

seetha

Updated on 03-Mar-2020 07:31:19

When the web browser starts to work offline, the onoffline attribute triggers. You can try to run the following code to implement onoffline attribute −Example<!DOCTYPE html> <html>    <body ononline = "onlineFunc()" onoffline = "offlineFunc()">       <script>          function onlineFunc() {             ... Read More

How do we embed custom data attributes on all HTML elements?

seetha

seetha

Updated on 03-Mar-2020 05:37:22

Use the data-* attribute to embed custom data attributes. It consists of the attribute, which should not contain any uppercase letter and should get prefixed after data.Example<!DOCTYPE html> <html>    <head>       <script>          function display(rank) {             var myRank = ... Read More

Define a scalar measurement within a known range in HTML

seetha

seetha

Updated on 02-Mar-2020 11:03:55

Use the <meter> tag to define a scalar measurement. The HTML <meter> tag specifies a scalar measurement within a known range (a gauge).ExampleYou can try to run the following code to learn how to implement <scalar> tag in HTML −<!DOCTYPE html> <html>    <head>       <title>HTML meter Tag</title> ... Read More

How to print a byte array in Java?

seetha

seetha

Updated on 24-Feb-2020 11:18:02

You can simply iterate the byte array and print the byte using System.out.println() method.Examplepublic class Tester {    public static void main(String[] args) {       byte[] a = { 1, 2, 3};       for(int i=0; i< a.length ; i++) {          System.out.print(a[i] +" ... Read More

Convert bytes to a string in java

seetha

seetha

Updated on 24-Feb-2020 10:26:35

Use String(byte[]) constructor to convert byte[] to String.Examplepublic class Tester {    public static void main(String[] args) {       String test = "I love learning Java";       byte[] bytes = test.getBytes();       String converted = new String(bytes);       System.out.println(converted);    } }OutputI ... Read More

Previous 1 ... 3 4 5 6 7 8 9 ... 11 Next
Advertisements