Html attributes: Difference between revisions
From Leechfinger
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 52: | Line 52: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
In css: | In css: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="css" line> | ||
#c2 { | #c2 { | ||
color: red; | color: red; |
Revision as of 00:09, 12 June 2024
Default HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My first page.</title>
<link rel="stylesheet" href="css/bootstrap-grid.css">
</head>
<body>
<a href="#" tabindex="1">First link</a>
<header>
<h1>Welcome to my crummy site</h1>
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Me</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<article>
<p>This is my paragraph.</p>
<nav>
this is my navigation. <br>
</nav>
<br>
<p title="do you see me">Hover over thei text to see more info.</p>
</article>
<footer>
<p>this is my footer.contact me. at [email protected]</p>
<img src="images/qais.png" alt="same thing again" width="300">
</footer>
<h1>Hello non world...!!!!!.......</h1>
<img src="images/bozo.png" alt="picture of my face" width="500">
<br />
<script src="js/bootstrap.bundle.js"></script>
</body>
</html>
Global attributes
<p title="more info">Hover over this text to see.</p>
<p lang="en">Hello</p>
<a href="#" tabindex="1">First link</a>
<article id="article" data-author="Bozo" data-published="2026-06-6">
Use of ID
In html
<p id="c2">This is my paragraph.</p>
In css:
#c2 {
color: red;
}