Skip to main content

Posts

Showing posts with the label option

What is CSS Class ?

In CSS, classes allow you to apply a style to a given class of an element. To do this, you link the element to the style by declaring a style for the class, then assigning that class to the element. CSS Class Syntax You declare a CSS class by using a dot (.) followed by the class name. You make up the class name yourself. After the class name you simply enter the properties/values that you want to assign to your class. .class-name { property:value; } If you want to use the same class name for multiple elements, but each with a different style, you can prefix the dot with the HTML element name. html-element-name.class-name { property:value; } You can also select elements (or classes) that's nested within another element or class. For example, div.css-section p will select all elements that are nested within a <div> element that uses the .css-section class. One major benefit of doing this is that you don't need to apply a class to every instance of an ele...

Different element with different background in CSS

The example explains how we can color different element with different backgrounds. <head> <style> h1 { background-color: #6395ed; } p { background-color: #e000ff; } div { background-color: #b000de; } </style> </head> <body> I'am colored <div> This is a colored div. This is a colored para We are still in the div element. </div> </body> </html>

HTML Tag - Scripting

<script> This tag is used to define a client-side script, such as a javascript. <noscript> This tag is used to define an alternate content for users that have disabled scripts in their browser or have a browser that doesn't support script.The <noscript> can be used in both <head> and <body>.

HTML Tag - Forms

<form> This tag is used to create a HTML form for user input. <input> This tag specifies an input field where the user can enter data. <textarea> This tag defines a multi-line input control. <select> This tag is used to create a drop-down list. <option> This tag defines a option in a select list. <optgroup> This tag is used to group related options in a drop-down list. <button> This tag defines a clickable button. <label> This tag defines a label for an input element. <fieldset> This tag is used to group related elements in a form. <legend> This tag defines a caption foe the <fieldset> element. <html> <body> First name: Last name: Male Fill these details and submit it it.....!!!!!!!!!!! Personal Details: User Name: Email: Date of birth: ABC PQR XYZ SRT Submit it! </body> </html>