Search
 
SCRIPT & CODE EXAMPLE
 

HTML

class html

<p class="ThisIsAClassName">HI</p>
Comment

how to make a class in html

<ul class="legend">
    <li><span class="greendot"></span>Text</li><br></br>
    <li><span class="yellowdot"></span>Text</li><br></br>
    <li><span class="reddot"></span>Text</li><br></br>
    <li><span class="blackdot"></span>Text</li><br></br>
</ul>
Comment

html create class

<h1 class="write a name">H1 content</h1>
Comment

html classes

<html>
  <style>
    .MyClass {
      background: black;
      text-align: center;
      color: white;
    }
  </style>
  <div class="MyClass">
    This text is styled by a css class
  </div>
  <!-- Fun Fact: If you are on vscode you can do .MyClass and press tab or enter -->
</html>
Comment

html class

<p class="ClassExample">ClassExample!!</p>
Comment

how to create class in html

<!DOCTYPE html>
<html>
  
<head>
    <style>
        .geek {
            background-color: green;
            font-size: 50px;
        }
    </style>
</head>
  
<body>
  
    <button onclick="myClass()">Try it</button>
  
    <div id="gfg">Geeks for Geeks</div>
  
    <script>
        function myClass() {
            var elem = document.getElementById("gfg");
            
            // Adding class to div element
            elem.classList.add("geek"); 
        }
    </script>
  
</body>
  
</html>
Comment

class_html

<html>
<head>
  <title>She Codes</title>
  <style>
    h1 {
      color: red;
      text-decoration: underline;
      font-size: 48px;
      font-weight: 100;
    }
    .coders {
      color: blue;
    }
    .courses {
      color: red;
    }
    .stories {
      color: green;
    }
  </style>
</head>
<body>
  <h1>
    SheCodes
  </h1>
  <ul>
    <li>
      <a href="https://www.shecodes.io/students" target="_blank" class="coders">
        Coders
      </a>
    </li>
    <li>
      <a href="https://www.shecodes.io/courses" target="_blank" class="courses">
        Courses
      </a>
    </li>
    <li>
      <a href="https://www.shecodes.io/stories" target="_blank" class="stories">
        Stories
      </a>
    </li>
  </ul>
  <hr />
  <p>
    <strong>
      More info
    </strong>
  </p>
  <img src="https://edge.alluremedia.com.au/m/g/2017/10/woman-coding.jpg" width="300" />
</body>
</html>
Comment

class html

<div classs="div1">
  <!--Your code-->
</div>
Comment

PREVIOUS NEXT
Code Example
Html :: bootsrap carousel 
Html :: prevent form submission on enter key 
Html :: making spinner in css 
Html :: HTML <figure and <figcaption Elements 
Html :: how to receive ether on smart contract 
Html :: how to resize submit button in html 
Html :: best background color in html 
Html :: default value to select simple form for 
Html :: how to change the url of a website in html 
Html :: tailwind font normal style 
Html :: wrap text around image bootstrap 
Html :: disable submit button after form validation 
Html :: html practice 
Html :: sample html template 
Html :: How to lazily load images or load only when scrolled 
Html :: close copy with html 
Html :: tina4 form token example 
Html :: how to make a head tag in html into a child element 
Html :: angular variable in html 
Html :: divide in single rows html using div 
Html :: required pattern date html 
Html :: html content editable no newline 
Html :: magento 2 theme claue pagination not showing up 
Html :: row span and column span in html example 
Html :: bootstrap admin prestashop tpl tabs 
Html :: tab indent in html 
Html :: mobile app 
Html :: how to make body element in html 
Html :: create a portfolio website with html css 
Html :: html page in wordpress 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =