Computer Science, asked by prochaks, 1 year ago

a html document about my school(10 lines) with background colour and image(height,width,border as u wish) plz help asap

Answers

Answered by shreyamishra8374
0

CSS tutorial

starting with HTML + CSS

1. The HTML

2. Adding color

3. Adding fonts

4. A navigation bar

5. Styling links

6. Horizontal line

7. External CSS

Further reading

This short tutorial is meant for people who want to start using CSS and have never written a CSS style sheet before.

It does not explain much of CSS. It just explains how to create an HTML file, a CSS file and how to make them work together. After that, you can read any of a number of other tutorials to add more features to the HTML and CSS files. Or you can switch to using a dedicated HTML or CSS editor, that helps you set up complex sites.

At the end of the tutorial, you will have made an HTML file that looks like this:

The resulting HTML page, with colors and layout, all done with CSS.

Note that I don't claim that this is beautiful ☺

Alert! Advanced:Sections that look like this are optional. They contain some extra explanation of the HTML and CSS codes in the example. The “alert!” sign at the start indicates that this is more advanced material than the rest of the text.

STEP 1: WRITING THE HTML

For this tutorial, I suggest you use only the very simplest of tools. E.g., Notepad (under Windows), TextEdit (on the Mac) or KEdit (under KDE) will do fine. Once you understand the principles, you may want to switch to more advanced tools, or even to commercial programs, such as Style Master, Dreamweaver or GoLive. But for your very first CSS style sheet, it is good not to be distracted by too many advanced features.

Don't use a wordprocessor, such as Microsoft Word or OpenOffice. They typically make files that a Web browser cannot read. For HTML and CSS, we want simple, plain text files.

Step 1 is to open your text editor (Notepad, TextEdit, KEdit, or whatever is your favorite), start with an empty window and type the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">

<html>

<head>

<title>My first styled page</title>

</head>

<body>

<!-- Site navigation menu -->

<ul class="navbar">

<li><a href="index.html">Home page</a>

<li><a href="musings.html">Musings</a>

<li><a href="town.html">My town</a>

<li><a href="links.html">Links</a>

</ul>

<!-- Main content -->

<h1>My first styled page</h1>

<p>Welcome to my styled page!

<p>It lacks images, but at least it has style.

And it has links, even if they don't go

anywhere&hellip;

<p>There should be more here, but I don't know

what yet.

<!-- Sign and date the page, it's only polite! -->

<address>Made 5 April 2004<br>

by myself.</address>

</body>

</html>

In fact, you don't have to type it: you can copy and paste it from this Web page into the editor.

(If you are using TextEdit on the Mac, don't forget to tell TextEdit that the text is really plain text, by going to the Format menu and selecting “Make plain text”.)

Alert! Advanced:The first line of the HTML file above tells the browser which type of HTML this is (DOCTYPE means DOCument TYPE). In this case, it is HTML version 4.01.

Words within < and > are called tags and, as you can see, the document is contained within the <html> and </html> tags. Between <head> and </head> there is room for various kinds of information that is not shown on screen. So far it contains the title of the document, but later we will add the CSS style sheet there, too.

The <body> is where the actual text of the document goes. In principle, everything in there will be displayed, except for the the text inside <!-- and -->, which serves as a comment to ourselves. The browser will ignore it.

Of the tags in the example, <ul> introduces an “Unordered List”, i.e., a list in which the items are not numbered. The <li> is the start of a “List Item.” The <p> is a “Paragraph.” And the <a> is an “Anchor,” which is what creates a hyperlink.

the HTML source shown inside KEdit

The KEdit editor showing the HTML source.

Similar questions