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; }
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>
<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>
0 comments:
Post a Comment