Wednesday, October 9, 2019

Tell me, how to integrate CSS file to your webpage?

1. With an external file that you link to in your web page:

<link href="myCSSfile.css" rel="stylesheet" type="text/css">
or using the import method:

<style type="text/css" media="all">
  @import "myCSSfile.css";
</style>

Advantages:
  • make the HTML pages neater and easier to manage
  • It can reduce the amount of work done
Note : if you have more than one web page with the same stylistic properties, you should create 
a separate CSS file and link your webpages to it.

2. By creating a CSS block in the web page itself; typically inserted at the top of the webpage in between the <head> and </head> tags:


<head>
   <style type="text/css">
      p { padding-bottom: 12px; }
   </style>
</head>


Note: Use this method If you want to override the CSS you have in a linked CSS file
or if you have only one-page website.
 

3. By inserting the CSS code right on the tag itself:

<p style="padding-bottom:12px;">Your Text</p>

Note: Use this method if you want unique element/tag need to affect with the CSS




Back to Questions: Tell me, how to integrate CSS file to your webpage?- "Tell me, how to integrate CSS file to your webpage?"


Tuesday, October 8, 2019

Which tag is used to align a picture so that one may be higher or lower than the other?


align= left 
align= center
align= right
align= justify

Align attribute helps to align block elements (tables, images, objects, paragraphs) in HTML elements. 


  • left : text lines are rendered flush left
  • right: text lines are rendered flush right
  • center: text lines are centered
  • justify: text lines are justified to both margins

syntax :


<H1 align="center"> How to align this picture to center </H1>

<H1 align="right"> How to align this picture to right </H1>

<H1 align="left"> How to align this picture to left </H1>

<H1 align="justify"> How to align this</H1>

example:
<h3 align="center">Hi, I'm Mattmarg.</h3> <p align="center"><img src="monkey.gif"></p> <h4 align="center">I reffed the big game between Bridgeville and <a href="http:www.hits.org/casterlin/">Casterlin</a>.</h4>
<div align="center"> <h3>Hi, I'm Mattmarg.</h3> <p><img src="monkey.gif"></p> <h4>I reffed the big game between Bridgeville and <a href="http:www.hits.org/casterlin/">Casterlin</a>.</h4> </div>
Back to Questions: Which tag is used to align a picture so that one may be higher or lower than the other?- "Which tag is used to align a picture so that one may be higher or lower than the other?"