Ich würde gerne wissen wie ich in einem bestimmten Code allen H2-Überschriften die Farbe rot zuweisen kann.
Bsp Code.
<head>
<meta http-equiv="content-type" content='text/html; charset=utf-8" />
<title> Demo </title>
<style type="text/css">
.rot { font-weight; normal; color: red; }
</style>
</head>
<body>
<h1> ...... </h1>
<h2> ...... </h2>
<p> ....... </p>
<h2> .... </h2>
<p> .... </p>
<script type="text/javascript">
for(i=0; i<document.*; i++) {
document.** = "rot";
}
</script>
</body>
</html>
weiß das vielleicht jemand? Hab etwas gegooglet und das hier gefunden
<style type="text/javascript">
tags.H2.color = "rot";
</style>
im <head> bereich einfügen
bin mir aber nicht sicher ob das überhaupt ansatzweise stimmt ;)