TML comments
HTML comments are text, phrases or sentenxes inside and HTMl file.
They are only shown in codes and not rendered by a browser.
Why use HTML comments?
HTML comments help both beginners and experiences web developers to easily organize their codes.
HOW to Write HTML Comments?
An HTML comment starts with <!— and ends with -- >
It looks like this.
<!--- comments go here --->
Example.
Input type
Output type
On the example given aboe. You have learned that you can make a single-line and multi-line of HTML comments.
And if you notices we also put comments beside a start and end tag.
That is for us to easily recognize where a specific elements starts and ends.
HTML styles
HTML styles are used to style HTML elements it also means changing default values.
For instance. Styling can change he default values of
Text color as black. Background color as white,textalignment as left and text size as 12
Internal Style sheet (internal styling)
Using an internal style sheet is also called internal styling.
An Internal style sheet Is composed of one or more cascading style .
A CSS rule-set consists of a selector and a declaration
Block surrounded by curly braces that contains one or
More cascading style sheet.(CSS) rule-set.
A css rule-set consists or a selector and a declaration
Separated by semicolons.
Each declaration includes a Css property name and
A valu.
Separated by a colo
n. <s
They are all enclosed inside the <style>
Element with its type=”text/css” attribute which is
Included inside the <head> element.
Background color Example.
Output
Text Aligning Example:
Output
No comments:
Post a Comment