Hi there everyone. First submit here. I am in a web development book today. Its the initial chapter introducing CSS. I’ve made an alternative style sheet to utilize to all our pages, though just one problem is puzzling me. I have made specifications question headings (h1, h2 and h3), for our bodies, for paragraphs, and blockquotes. But one of the last steps, it says to use the following type to elements. What precisely does this are What tags Precisely how would I do that in CSS Relating to no problem setting the properties, but what precisely do they signify by hypertext elements
With thanks everyone!
Marky
Such as, if your CSS file has something such as this….
p
font-size: 14px;
color: #000;
Wherever you employ the Hypertext (HTML) label < p> as part of your HTML, it may take-on that font size and color.
< p> blah blah< /p>
You usually start out your CSS such as this…
html, body
perimeter: 0px auto;
padding: 0;
font-family: arial;
font-size: 12pt;
color: #000;
Of which sets-up the simple styling for all within < html>… < /html> and < body>… < /body>
Any HTML tag is usually given specific CSS properties, by using lessons.
Example
. bigtext
font-size: 20px;
font-weight: vivid;
These days, whenever you have to use that, you can specify in any good tag…
< p class=" bigtext" > blah blah< /p>
or
< course class=" bigtext" > blah blah< /span>
or
< td class=" bigtext" > blah blah< /td>
Thanks a lot very much to your input. So in order to see if I realize, this is the present code in my CSS files before this step..
html, body background-color: whitened; font-family: Verdana, Helvetica, sans-serif; background-image: url(body. jpg); background-repeat: repeat-y; perimeter: 0px p margin-left: 10px; margin-top: 10px; margin-right: 20px; margin-bottom: 20px blockquote wider: 200px; padding: 10px; color: white; font-size: 16pt; edge: 3px solid ebony background-color: rgb(255, 204, 0); background-image: url(block. jpg); background-repeat: repeat-x; margin-left: 5px; margin-top: 5px; margin-right: 10px; margin-bottom: 5px; drift: right h1 text-align: heart; height: 100px; perimeter: 0px; background-color: whitened; background-image: url(h1back. jpf); background-repeat: repeat-x; border-bottom: 1px good black h2 text-indent: 30px; color: white; background-color: rgb(108, 87, 12); letter-spacing: EIGHT; margin: 0px; font-variant: small-caps h3 margin-left: 10px #column1 wider: 140; padding-left: TEN; padding-top: 20; drift: left #column2 wider: 40%; float: kept; border-left: 1px good black; border-right: 1px good black #column3 wider: 40%; float: kept;
The current step says to display hypertext components as block elements. Then to fixed margin and font dimensions. Why would it have me change the margins again I feel like I am doing something erroneous. And also, WE can’t see, to discover where it says anything about presenting hypertext elements since block elements.
Furthermore, is the way I’m making my code readable a good way to go I think so simply because its clear to discover what properties a number of tags have, but if you’ll find more popular procedures, I would love to know. Thanks!
Marky
Here’s a thought….
Download a free of charge CSS template and try out it.
Discover how they did it.
Like these:
free css templates : Google Search
I wouldn’t set a background-image property to both body and this html DOM things (hypertext element). I actually by no means style the HTML tag by any means, being that our bodies element encompases the whole page anyhow. Unless you put a border that’s larger than zero around the body, which is pretty uncommon.
Displaying information within a block element is pretty easy, you can only wrap some text inside a paragraph tag, and style the label, or use a range of block elements.
Tips on block degree elements.
These days remember however, after you add a style to some P element, it changes every single P element included in the document. I believe they’ll give you further into your own book where it’s going to tell you the way to style each aspect indipendantly. If not necessarily feel free to ask
You final note, is usually to keep all your own CSS indented properlly. Start the habbit connected with adding a semicolon for the final attribute of the CSS element just before each closing clump, and don’t group attributes on 1 line, each attribute really should have its own collection.