After referring these two links (font properties and text properties), I have a doubt.
What is font? and what is text?
http://www.w3schools.com/CSS/css_reference.asp#font
http://www.w3schools.com/CSS/css_reference.asp#text
For example both color, font-size describes typography but why they placed in two different categories?
I'm missing some thing basically. What is it? Thanks for any help in advance.
Font is purely for control of Font related attributes whereas Text controls things that go beyond just the Font (such as alignment, etc).
Font is somehow like properties of the text, like :
Font-size:15px;
Font-Family: Sans Serif;
Font-Color: Red;
Text are the one that you will print on the browser,
Font is the CSS Property.
For more info refer this link : CSS Text & Font Properties
Font is how the letters look like. Text is where to place them...
Related
i just change my font website to Questrial (Google font). And my language is Vietnamese, when i bold text it show smaller than normarl text.
Please help me fix that, thank a lot
Ex link : https://digitalbyrick.com/hieu-ve-edgerank-de-tang-toi-da-do-hien-thi-cua-fanpage/
enter image description here
Somewhere else in your CSS, you have:
b, strong { color: black; font-size: 18px; }
That’s being inherited by all those words in <strong> tags, while the paragraph font size is 21px.
It doesn’t appear related to the font, as that still happens if you change the font:
As Ali_k pointed out in the comment, Questrial doesn’t appear to have a bold style designed however, so if you try and change the font-weight, you may end up with faux bolding (depending on your other CSS).
What is the CSS that must be created to match (exactly) the style given in the text properties in Photoshop ?
Photoshop has four basic text properties:
font-family. The CSS for this is font-family: name;
?
font-size. The CSS for this is font-family: 0px;
?
But how can we set the style for the 2 and 3 properties ?
Here is what the options for those properties are:
You aren't going to match them exactly.
2.) Different combos of font-style, font-weight, and letter-spacing will recreate many of the options.
4.) Aliasing varies across browsers and doesn't have a "standard." That being said, font-smoothing and especially text-shadow will get you pretty close. This answer has some good examples.
Example Fiddle
When working with CSS, i'm able to set all properties of font in one declaration like font: italic bold 24px "verdana"; instead of writing font-style:italic; font-weight:bold; font-size:24px; font-family:"verdana";
Similarly i tried to set text properties (text-align, text-indent, text-transform, text-decoration, etc) in one declaration but i did not get the effects.
What I want to know is...
Is it possible to set these kind of properties in one declaration like text:underline justify capitalize 20px;?
if possible...,
-what properties can I set?
-What is the order of the properties that i should specify?
-what are the required properties?
Although font is a known abbreviation for an aggregate collection of properties, there does not appear to be any equivalent to let you specify all text properties together.
This is not possible and neither efficient to look back on. But what you can do is make an extra stylesheet.css and add "standard" classes in there like a class: text1
Which you will fill in with:
text-align: justify;
text-decoration: underline;
etc.
so you just have basic classes which add alot of css you dont need to make an extra stylesheet but it would keep everything orderd from custom css to standard classes you made on your own and you can use em for sites in the future.
What is default font style of textarea in chrome? What should to make it default look like?
Purpose of my question is that I wanna make the text make same in input as in textarea. In text input is maybe too "bold" :P The question should be: What are default font properties applied on textarea? What would I wrote if I wanna look like as default?
textarea {
font-???: ???;
etc.
}
To answer your question directly,
The default font property of a textarea is font-family: monospace
While the default font property of a input is font-family: Arial.
All the default styling properties of an element (in Chrome) can be found by looking at the computed styling of the element in the Chrome developer tool. For all the properties, view this (example)
As mentioned in another answer, you can force textarea to inherit the font style, to make it look like default:
textarea {
font-family: inherit;
}
I need to set the font to "strong", but can't work out how to do this with CSS? I tried
font-weight: 'Strong';
And I also tried it without the marks and it didn't work either. I'd like to set it to strong and not just bold as I've heard it helps disabled people while they are browsing your website (but that may be rubbish?!)
You probably mean:
font-weight: bold;
There is no strong weight, try bold (which is usually the default browser style for a <strong> element.
more about font-weight at MDN
I just solved this exact problem based off the post I read here. Bold is not what you want as bold is not the equivalent of strong.
For me using a polymer custom component.
Strong = font-weight: 400
Bold starts at font-weight: 500 or greater.
Looking into it a bit further reveals that this is dependant on browser version and display and sometimes things don't get rendered how you want.
More details can be found at the MDN link posted above by steveax and Ryan
bold is the only way. You're confusing the accessibility aspect with the HTML tags <b> and <strong>, which have a bold style by default.
<b> versus <strong> has less to do with accessibility, too, and more to do with semantics and the separation of styles from content. After all, you can style all <b> tags to be non-bold, and that’s just confusing.
font-weight:bold; is the equivalent of 'strong' font. You can also try
font-weight:900; (using numeric values).
strong is a html tag. css is for visual.