- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6685 Articles for Javascript
1K+ Views
HTML has various tags to format content, heading, align content, add sections, etc to a website. The most important tags for an HTML document is doctype, , and .doctypedoctype is the doctype declaration type. It is used for specifying which version of HTML the document is using.The HTML tag is the container for all other HTML elements except for the tag, which is located before the opening tag. All other HTML elements are nested between the and tags.The HTML tag is used for indicating the head section of the HTML document. Tags included inside ... Read More
1K+ Views
Hyper Text Markup Language which is also known as HTML is used to create web pages and web applications. This application made using HTML are accessible to anyone on the world wide web (internet). The Hydertext and Markup language together help define a basic blueprint of the website or web applications.An HTML tag is used to indicate the beginning and closing for an HTML element of an HTML document. With help to these HTML tags a browser transforms an HTML document into a website or web application. In general, a tag is structured with three components, Opening Tag - Marks ... Read More
0 Views
The tag, which is also known as inline frame which helps us load external objects inside another document on a web page. is like a mini web browser within a web page, which is allowing us to include content from other sources into our web pages. They are commonly used to embed Google Maps in to the contact page of an website or ad sense or to add a Youtube videos to a webpage, which help us to hold the user to our web page.Syntax The basic syntax for adding an iframe to a web page can be ... Read More
469 Views
In layman language, an acronym is a word formed by taking letters of each word in a phrase to form an abbreviation. Acronyms are a subset of abbreviations i.e. abbreviation is a shortened form of a word.The tag isn’t supported in HTML5 and is deprecated now. Do not use. To add abbreviation in HTML, use the tag. Both abbreviation and acronym are the shortened versions and are represented as a series of letters. Some of the examples include, "Mr.", "IST", "MRI", “NASA”, “ISRO” etc. ExampleYou can try to run the following code to add abbreviation in HTML.Live Demo ... Read More
154 Views
Website development included writing code in HTML, CSS, JavaScript and the platform you’ve chosen. Your website may look correct, responsive and developed with website standards, but it may have some internal issues.Tools are provided by W3C, to validate your website code:Validate HTML5Validator.nu is a validator, which validates HTML5, ARIA, SVG 1.1 and MathML 2.0. It checks the complete document and points out where the markup isn’t following the doctype.W3C Markup ValidatorIt checks the HTML doctype and the markup. This validator is for those who are using HTML4 or XHTML1.x doctype. It also validates HTML5, but Validator.nu is considered far better since ... Read More
4K+ Views
In this tutorial, we will learn to print a triangle formed of '#' using JavaScript. You need to use nested loops to print a triangle formed of '#' in JavaScript. Loop is one of the features in programming languages that executes a set of instructions a several till the condition does not evaluate as false. Nested loops are the loops that contain a loop inside a loop itself. We are going to use two of loops in JavaScript to execute our task. Following are the loops we are using to print a triangle formed of '#' − for loop ... Read More
Why in JavaScript, “if ('0' == false)” is equal to false whereas it gives true in “if(0)” statement?
1K+ Views
Let’s see the conditions one by one − if(‘0’ == false)It follows the following rule −If Type(y) is Boolean, return the result of the comparison x == ToNumber(y)The == does type coercion. This means an explicit type conversion is requested to match the type of the two operands. The left side '0' is converted to a number 0. On comparing the two numbers, and since 0 equals 0, the result is true. In this case, this does not work since it does not implies about the truish/falsy nature of the '0' string, since it got coerced before it was compared.if(0)This checks ... Read More
1K+ Views
To get current year in JavaScript, use the getFullYear() method.ExampleYou can try to run the following code to print current year −Live Demo Click below to get the current year: Display Year function display() { var date = new Date(); var res = date.getFullYear(); document.getElementById("test").innerHTML = res; }
19K+ Views
In this tutorial, we will learn how to print object arrays in JavaScript. What is an object array or an array of objects? An array of objects is used to store a fixed-size sequential collection of identical elements and store many values in one variable. Next, we will see the options to print an array of objects in JavaScript. Using the stringify() Method of the JSON Object Here, we will learn how to stringify the object array. To correctly display an array of objects, we need to format the array as a JSON string. JSON.stringify() formats the array and gives ... Read More