bestwebdesign

Freelancign web design and Graphics design

Monday 27 November 2017

Browser Support

HTML5 Browser Support

HTML5 is upheld in every cutting edge program. 

Also, all browsers, old and new, naturally handle unrecognized elements as inline elements. 

Along these lines, you can "educate" more seasoned browsers to deal with "obscure" HTML elements.

Define Semantic Elements as Block Elements

header, section, footer, aside, nav, main, article, figure {
    display: block; 
}

New Elements to HTML

You can likewise add new elements to a HTML page with a program trap. 

This illustration includes another element called <myHero> to a HTML page, and characterizes a style for it:

Example

<!DOCTYPE html>
<html>
<head>
  <script>document.createElement("myHero")</script>
  <style>
  myHero {
      display: block;
      background-color: #dddddd;
      padding: 50px;
      font-size: 30px;
  
} 
  
</style> 
</head>
<body>

<h1>A Heading</h1>
<myHero>My Hero Element</myHero>

</body>
</html>
Yourself Try

Share:

0 comments:

Post a Comment


Web Design Tutorial

Theme Support

Munere veritus fierent cu sed, congue altera mea te, ex clita eripuit evertitur duo. Legendos tractatos honestatis ad mel. Legendos tractatos honestatis ad mel. , click here →