Step 6 Adding a Banner

Step 6: Adding a Banner

Adding a Banner Prepare a banner image using a graphic editor program (Picture X.19). The dimensions of the banner are 900 x 175 px. Create a new folder (Images) in the project folder and copy the banner to this folder.

Picture X.19: The banner of the site.

  • Use an <img> HTML tag to place the banner in the header division (Picture X.20). The <img> tag is used to show an image on the page. Write the path and picture name in the src (source) attribute, and alternative text in the alt attribute. The alt attribute specifies alternate text to be displayed if for some reason the browser cannot find the image, or if the user has disabled the image files in Web browser settings. Since text-only browsers are not capable of displaying images, they greatly depend on the alt attribute.


Picture X.20: Adding the banner to the Web page.

  • Open the CSS file, and specify the height of the header (Picture X.21).


Picture X.21: Setting the height of the header division.

  • Save and run the page to see the result (Picture X.22).

Picture X.22: The banner of the site in the browser window.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *