Sunday, July 9, 2017

HSC ICT (Chapter 04, Lecture-04)


8) Viewing HTML document
Once you have saved your document it‟s time to see how it looks like. To display the page follow the following steps:
1. Open any web browser (here we will see Mozilla Firefox).
2. Click the file menu.
3. Choose the Open file option.
4. Navigate the file where you saved the file and select it.
5. Click open.

 Your file should be displayed in the browser and it should look like as follows:
                                              Figure : Showing HTML document in browser

 9) HTML Attributes

HTML elements can have attributes. HTML Attributes are property of the elements which may have values and these attribute values are always be enclosed in quotes. Attributes are used to modify or to customize HTML elements. We may want to change background color, font size and color or perhaps change the width of a table; all of these and more can be done using attributes. Attributes are always specified in the opening tag. Attributes consist of a name and a value separated by an equals (=) sign
(name/value pairs like: name = "value"). For example, consider the tag BODY, which marks as the beginning (or end) of HTML body. This tag can have several attributes; one of them is BGCOLOR, specific the background color of the document. <BODY bgcolor = ”background_color” background =“background_image”>. Double style quotes are the most common, but single style quotes are also allowed.
 

10) <BODY> Attributes

BGCOLOR: The default background color of a web page is white. We can change the default background color by using the bgcolor attribute of the <body> tag.
Example
<BODY BGCOLOR="green"> </BODY>
The above HTML code will set the background color to green. You can either specify the color name or RGB hexa value of the color. TEXT: used to set the color of the text of the document.
Example
<BODY TEXT="red"> </BODY>
MARGINS: set the left /right margin of the document. LEFTMARGIN: set the left margin of the document.
Example
<BODY LEFTMARGIN="20"> </BODY>
TOPMARGIN: set the top margin of the document.
Example
<BODY TOPMARGIN="20"> </BODY>


 
Share:

0 comments:

Post a Comment

Recent Posts

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.