HTML and CSS Reference
In-Depth Information
index.php
HTML
The template HTML, found in index.php , has been changed from the HTML5 Layout article to
focus on the content being a blog post with comments. You can view the HTML source here .
10
The main elements to be aware of are:
<sectionid="content"> - the blog post content
<sectionid="comments"> - where the comments are to appear. This is where the
majority of our work will be done
COMMENTS
Now that we've got the HTML in place for our blog post and for displaying the comments we
also need a way for our readers to submit comments, so let's add a <form> element to collect
and submit the comment details to post_comment.php . We'll add this at the end of the
<sectionid="comments"> section wrapped in a <divid="respond"> .
< div id =" respond ">
< h3 > Leave a Comment </ h3 >
< form action =" post_comment.php " method =" post " id =" commentform ">
< label for =" comment_author " class =" required "> Your name </ label >
< input type =" text " name =" comment_author " id =" comment_author "
value ="" tabindex =" 1 " required =" required ">
< label for =" email " class =" required "> Your email; </ label >
< input type =" email " name =" email " id =" email " value =""
tabindex =" 2 " required =" required ">
< label for =" comment " class =" required "> Your message </ label >
< textarea name =" comment " id =" comment " rows =" 10 "
tabindex =" 4 "
required =" required "></ textarea >
Search WWH ::




Custom Search