Lecture 3 In this lecture I study about tags which are used in html. Bold: To do text bold in html. we use tags <b> </b>. For example <b> Hello World </b>. Hello World Italic: To do text italic in html.we use tags <i> </i>. For example <i> Hello World < /i>. Hello World Underline: To place line under any text. we use tags <u> </u>. For example <u> Hello World </u> Hello World Strike: To use Strike tag in html for unimportant and inaccurate text. For example <strike> 100 </strike>. 100 How to create random paragraph in html? We use "lorem" keyword to create random paragraph in html. How to use ? <p> lorem <p>. To keep paragraph on one page: To keep paragraph on one page in html we use "Alt+Z" keyword. Superscript and Subscript in html We use superscript a...
Java-Script Lecture #25 Q. What is the purpose of .innerHTML, .value and .textContent in java-script? .innerHTML, .value and .textContent are not used for same purpose in java-script, they serve different roles when working with HTML elements. They might have similar syntax because they are properties of DOM elements in HTML, DOM stand for Document Object Model. 1. .innerHTML: This property is used to get or set the HTML content within an element. You can use this to retrieve the HTML content inside an element or to change it by assigning new HTML content to it. 2. .value: This property is used with for elements like input fields, checkbox and radio buttons to get or set their current values. You can use this to retrieve the current value of the input fields or to set a new values, you can get or set the input fields values through java-script. 3. .textContent: This property is used to get or set the text content of the element. You can use this...
JAVA-SCRIPT Lecture #24 Functions in Java-script Functions are blocks of reusable code in java-script that can be defined and executed when needed. In java script a function is executed when something invokes it means call it. Function Declaration : You can declare a function in java-script using "function" keyword, followed by function name and set of parentheses. Function name can contain letter, digits, lowercase, uppercase, underscore and dollar sign, and same rules followed for variables. Here is the example of function declaration. Syntax: function function-name ( ) { // code to be executed } Code: (addition of two numbers) <!DOC TYPE> <html> <head> <title> Java-script </title> </head> <body> enter 1 number: <input type=" text" id="z"> <br> <br> enter 2 number: <input type=" text" id="x"> <br> <br> <button onclick= abc( )> Click </button...
Comments
Post a Comment