Introduction: what is css in html style

This article for those people who wants to know what is css in html style . In the past, much of the visual formatting of webpages was supplied by markup elements.  Squarley mixing the concepts of logical and physical markup into the mess that is classic html.

CSS means cascading style sheet. Css is a designing language. It is use to create beautiful webpages. We can apply designing on html tags by using css.

We can use css in three different ways:

  1. Inline
  2. Internal
  3. External

 

Inline: In this method we used css in html  element starting tag with style attribute.

Ex–>   <h1 style=”color:green;”>Hello world this is green heading</h1>

 

Internal: By using this method we need to define css in <head> section of webpage with the using of <style></style> element.

Ex–>    

what is css in html style

 

After the title tag we start style tag and write css code. In this coding  we have used css on body and span element in a webpage.

 

External: In external method our css file and html file are different. We used <link> attribute to join a css file with a html webpage.

 

what is css in html style

 

 

We can control webpages presentation with css. It gives you full control on webpages design. you can  change text color, font-family, background etc.

Css is most powerful technology. css works in context of property and value. If you want to change background color of a webpage. In this case background color is a property and color name or color code is a value of that property.

Property:value;

What is css in html style and it’sAdvantage 

  1. You can save your timeby using css because you can use one css file on multiple HTML elements.
  2. Your website speed never slow because css coding consume less space.
  3. Maintain a webpage in css is very easy.
  4. Css gives you more style option.
  5. We can configure a webpage for multiple devices by using css.

 

Try Some Examples of css

Example 1

what is css in html style 1

In this example we are coded background-color:lightblue; so the color of webpage background is showing Lightblue.

After this we use css on <h1> tag so the text My First Css Example is showing white on this webpage.

Then we apply css on paragraph element so the text size in paragraph showing 20px withont-family verdana.

 

Example 2

what is css in html style 2

 

In this example we use css box modal.  The box model allows us to add a border around elements, and to define space between elements.

We use html <div> element in this example to create a beautiful box.  In the starting of styleing we apply css on div element.

Background-color:gray; is used for div box background color.

Width is used to set a specific width for div box.

Border is used to define the border for div box and give  a color to div border. We gave this border color value green so we are looking it green.

Margin is use for give some space to box from top and left of  browser.

 

Some properties of Css

 

CSS Padding

The CSS padding properties are use to generate space around content.

The padding clears an area around the content of an element. With CSS, you have full control over the padding. There are CSS properties for setting the padding for each side of an element .

 

CSS Outline:

The CSS outline properties specify the style, color, and width of an outline.

An outline is a line that is drawn around elements  to make the element “stand out”.

However, the outline property is different from the border property . The outline is NOT a part of an element’s dimensions.

The element’s total width and height is not affected by the width of the outline.

 

what is css in html style and it’s  Fonts:

The font family of a text is set with the font-family property.

The font-family property should hold several font names as a “fallback” system. If the browser does not support the first font, it tries the next font, and so on.

Start with the font you want, and end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available.

 

CSS height / width:

The height and width properties are use to set the height and width of an element.

The height and width can be set to auto (this is default. Means that the browser calculates the height and width), or be specified in length values.

Like px, cm, etc., or in percent (%) of the containing block.

 

CSS Position:

The position property specifies the type of positioning method used for an element.

 

CSS background-repeat Property:

The background-repeat property sets if/how a background image will be repeated.

By default, a background-image is repeate both vertically and horizontally.

 

CSS border color:

The border-color property sets the color of an element’s four borders. This property can have from one to four values.

 

CSS border-radius:

The border-radius property is use to add rounded corners to an element.

The border-radius property is a shorthand property for setting the four border-*-radius properties.

If you specify only one value for the border-radius property.

This radius will be apply to all four corners.

CSS3 @keyframes Rule

The @keyframes rule specifies the animation code.

The animation is create by gradually changing from one set of CSS styles to another.

During the animation, you can change the set of CSS styles many times.

Specify when the style change will happen in percent, or with the keywords “from” and “to”, which is the same as 0% and 100%. 0% is the beginning of the animation, 100% is when the animation is complete.

Tip: For best browser support, you should always define both the 0% and the 100% selectors.

what is css in html style

 

26 thoughts on “What is css in html style

  1. It’s a shame you don’t have a donate button! I’d certainly donate to this outstanding
    blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to new updates and will share this
    site with my Facebook group. Talk soon!

  2. An outstanding share! I have just forwarded this onto a colleague who was doing a little
    research on this. And he in fact bought me breakfast because I found it for him…

    lol. So allow me to reword this…. Thank YOU for the meal!!
    But yeah, thanks for spending some time to discuss this topic here on your site.

  3. Wow, wonderful blog layout! How lengthy have you ever been running a blog for?

    you make running a blog look easy. The full glance of your website
    is fantastic, let alone the content material!

  4. I absolutely love your website.. Very nice colors & theme.
    Did you develop this amazing site yourself? Please reply bak as
    I’m looking to create my own site and would love to learn where you got this from
    or exactly what the theme is named. Thanks!

  5. Hi! I could have sworn I’ve been to this website before but after looking at
    some of the osts I realized it’s new to me. Anyhow, I’m certainly pleeased
    I discovered it and I’ll be book-marking it and checking back
    often!

  6. What i don’t realize is in fact how you’re no longer actually a
    lot more neatly-appreciated than you might be now. You are very intelligent.

    You already know therefore considerably when it comes to this subject,
    produced me in my view imagine it from so
    many various angles. Its like men and women aren’t involved until it’s
    something to accomplish with Girl gaga! Your own stuffs
    outstanding. All the time take care of it up!

  7. Oh mmy goodness! Amazing article dude! Thank you so much, However I am encdountering troubles with your RSS.
    I don’t understand the reason why I am unable to subscribe to it.

    Is there anhybody getting identical RSS issues?
    Anybody who knows the answqer can you kindly respond? Thanx!!

  8. I know this site presents quality dependent articles or reviews and extra stuff, is
    there any other site which presents these kinds
    of information in quality?

  9. With havin so much content do you ever run into any problems of plagorism or copyright violation? My website has
    a lot of unique content I’ve either written myself
    or outsourced but it seems a lot of it is popping it up
    all over the web without my permission. Do you know any ways to help protect against content from
    being ripped off? I’d really appreciate it.

  10. You’re in some serious need of relaxation. That’s where a site like http://www.camgirl.pw comes in handy. You can do a whole lot of relaxing there. You’ll find plenty of fun girls to talk to. These are the hottest and most wild girls on the internet. Chat with them and have yourself a good time.

  11. Hi there, I found your web site by the use of Google at thhe same time as looking for a similar
    subject, your web site came up, it looks good. I have bookmarked
    itt in my google bookmarks.
    Hi there, simply become alert to yor blg through Google, and located that it is truly informative.
    I am going tto be careful for brussels. I’ll appreciate should you continue this in future.
    Numerous people might bee benefited from your writing.
    Cheers!

  12. Super! Interesting information over this web. It’s pretty worth enough for me. In my view, if all website owners and bloggers made good content as you did, the net will be a lot more useful than ever before.| I could not resist commenting. I ‘ve spent 3 hours trying to find such infos. I’ll also share it with a couple of friends interested in it. I’ve just bookmarked this website. Right now with the search done, I’ll find some Russia model Webcams. Gracias!!! Regards from Russia 2018!

  13. You’ve been working hard lately. All that stress has got to be eating at you. Why not take a break and enjoy some cam girls? There’s plenty of them to enjoy at http://www.camgirl.pw It’s wall to wall babes at this site. You’ll know that right away after your first visit.

  14. Fascinating blog! Is your theke custom made or did you download it from somewhere?

    A theme like yours with a few simple adjustements would really make my blog stand
    out. Please let me know where you got your design. Thanks

  15. Today, I wejt to the beachfront with my children. I found a sea shell and gave it to my 4 ysar
    old daughter and said “You can hear the ocean if you put this to your ear.”
    Shhe placed the shelll to herr ear and screamed.
    There was a hermit crab inside and it pinched her ear.
    She never wannts to go back! LoL I know this is completely off topic but I had to tell someone!

Leave a Reply

Your email address will not be published.