CSS is an acronym for the phrase "cascading style sheets", it is a prescribed language presentation of html tags on the site. language is being used a lot in web programming, so to speak css advent created a revolution. sometimes confusing when you realize that your code does not display the same on different browsers, css will help you solve this problem.
css specifies how to display the contents of the html tag in the browser almost identical, defined by html tag attributes for it. inserting css into html page
we have 3 ways to put content on the website css as follows: way 1: insert content into Enclose css <style> </ style> in the <head> </ head> section of the site:
ex:
<html>
<head>
<title> insert css-way 1 </ title>
<! css inserts in between the pair following cards:>
<style type = "text / css">
css content placed within this
</ style>
</ head>
<body>
</ body>
</ html>
2 ways: directly inserted into the html tag.
css insert directly inside the opening tag of html if there are multiple attributes should be regulated, we separated with spaces between them.
ie we insert css here to open the card of the card pair <p> </ p> <html>
<head>
<title> insert css-way 2 </ title>
</ head>
<body>
<p style = "css content here, separated by a space">
</ p>
</ body>
</ html>
3 ways: * link to a file outside .css Here is the most recommended way of using css for the usability and flexibility of it. assuming you have a website consisting of hundreds of pages, if you want to make some changes to the website this way, instead of bricks to knock on every single page, you just need to edit the external css file a bit, hundreds of sites your are changed. syntax and to connect with the <link> (no closing tag), use the following syntax: <link rel = "stylesheet" href = "path to file .css" type = "text / css" /> This tag is placed in the <head> </ head> section of the site, and do not need to put in the <style> </ style> if you put the file * .css same directory websites, then the href attribute you just write: href = "<ten_file_css.css" if the file is not the same directory .css website: you need only the absolute path to that file in the href attribute .css
ex:
<html>
<head>
<link rel = "stylesheet" href = "danbocuc.css" type = "text / css" />
</ head>
<body>
</ body>
</ html>
What needs to learn css
external conditions like learning html, css studying, you need to master the basics of htmltruoc have. this will be a good condition to help you to acquire knowledge about css lot faster This is a hyper-focus on a baseline number of css. in a future article, we will begin to learn about the general syntax of css