Page 150 - DCAP202_Fundamentals of Web Programming
P. 150
Unit 12: HTML Forms
The <header> element is intended to usually contain the section’s heading (an <h1>-<h6> element Notes
or an <hgroup> element), but this is not required. The <header> element can also be used to
wrap a section’s table of contents, a search form, or any relevant logos.
Example:
<html>
<head></head>
<body>
<header>
<span style=”color:brown;font-style:italic;”>abc</span>
<hr>
<hgroup>
<h1>welcome </h1>
<h2>Humans aren’t the only talkers!</h2>
</hgroup>
</header>
<article>
<p>Ever encountered a talking tree? </p>
</article>
<footer>
<hr>
Welcome1
</footer>
</body>
</html>
12.3.5 Commenting in the HTML Coding
Comments are a great asset to new developers and a great way to place little notes to yourself
reminding yourself what pieces of code are doing what. Comments are also great ways to
troubleshoot bugs and code errors, as they give you the ability to comment out lines of code one
at a time to search for the exact line causing problems.
As a sprouting young web developer, HTML code comments are your friends! A comment is a
way to control which lines of code are to be ignored by the web browser and which lines of code
to incorporate into your web page. There are three main reasons why you may want your code
to be commented out or ignored.
Comment out elements temporarily rather than removing them, especially if they’ve
been left unfinished.
Write notes or reminders to yourself inside your actual HTML documents.
Create notes for other scripting languages like JavaScript which requires them.
Comment Tags:
<!— Opening Comment Tag
—> Closing Comment Tag
LOVELY PROFESSIONAL UNIVERSITY 143