HTML Classes

HTML Class Attribute: For elements with the same class name, the HTML class attribute defines equal styles. Example: <!DOCTYPE html> <html> <head> <style> .fruits { background-color: crimson; color: white; margin: 15px; padding: 10px; } </style> </head> <body> <div class=”fruits”> <h2>Apple</h2> </div> <div class=”fruits”> <h2>Mango</h2> </div> <div class=”fruits”> <h2>Orange</h2> </div> </body> </html> Explanation: In the above … Read more

HTML with CSS

CSS or Cascading Style Sheets apply style to HTML elements to make them more attractive when displayed on a web page. There are 3 ways to apply CSS to HTML elements. These are: Inline CSS: Uses the style attribute in HTML elements. Internal CSS: Uses a <style> element in the <head> section. External CSS: Uses … Read more

Form Tags in HTML

HTML Form A section of a document to control text fields, password fields, checkboxes, radio buttons, submit buttons, menus etc. is called and is created by the HTML form. The data thus entered in a form is sent to the server for further processing. Thus collecting some info from the site visitor is easy with … Read more

List tags in HTML

To specify lists of information, an HTML List is used, which can be any of the three different types. Ordered List or Numbered List (ol) Unordered List or Bulleted List (ul) Description List or Definition List (dl) HTML Ordered List or Numbered List: As the name itself suggests, all the list items are marked with … Read more

Anchor tag in HTML

HTML Anchor To define a hyperlink to other web pages, files, locations, or any URL, using the “href” attribute, the HTML anchor tag is used. The “href” attribute specifies the address of the destination page. Appearance: Unvisited link: Underlined and Blue. Visited link: Underlined and purple. Active link: Underlined and red. Syntax: <a href = … Read more