Styling Custom Tags/Elements

In this example below you will see how to do a Styling Custom Tags/Elements with some HTML / CSS and Javascript

Styling custom tag/elements will work but it shouldn't be done. There is talks going on about custom elements to make coding more semantic eg. for a support telphone number you might want to use an element called

Thumbnail
This awesome code was written by aliuk12, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright aliuk12 ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Styling Custom Tags/Elements</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Styling Custom elements/tags</title>
</head>
<body>
  <shoutout>SO WRONG...ON SO MANY LEVELS.</shoutout>
  <mytag>Just because you can, doesn't mean you have too.</mytag>
</body>
</html>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/aliuk12/styling-custom-tagselements-Aayrb */
shoutout {
  display:block;
  font-weight:bold;
  font-size:2em;
  color:red;
}
mytag{
  color:blue;
}

Comments