web_development:text:attributes
Differences
This shows you the differences between two versions of the page.
Next revision
|
Previous revision
|
web_development:text:attributes [2021/11/22 05:41] mag created |
web_development:text:attributes [2023/08/16 09:33] (current) |
| |
* We can select a section of text to style by using <html><span></html>. Let's make the text 'wagging his tail' blue. | * We can select a section of text to style by using <html><span></html>. Let's make the text 'wagging his tail' blue. |
<code><p>On Sundays they drive to the <sup>mountains</sup> where he runs around smelling the grass and wagging his tail. He gets so tired that he sleeps all the way home.</p></code> | <code><p>On Sundays they drive to the <sup>mountains</sup> where he runs around smelling the grass and <span style="color:blue">wagging his tail</span>. He gets so tired that he sleeps all the way home.</p></code> |
* Run the code to see whether you did it correctly. | * Run the code to see whether you did it correctly. |
| |
<code><em style="color:red; font-weight:700;">pet dog</em></code> | <code><em style="color:red; font-weight:700;">pet dog</em></code> |
* Now the red text should also be bold because it has a higher <html>font-weight</html>. 300 is very faint and 900 is very heavy. | * Now the red text should also be bold because it has a higher <html>font-weight</html>. 300 is very faint and 900 is very heavy. |
* The <html>;</html> marks the end of a single parameter:value pair so when the browser encounters more text inside the inverted commas, it knows to expect a new pair. | * The <html>;</html> marks the end of a single <html>parameter:value</html> pair so when the browser encounters more text inside the inverted commas, it knows to expect a new pair. |
| |
==== Indent ==== | ==== Indent ==== |
web_development/text/attributes.1637588501.txt.gz ยท Last modified: 2023/08/16 09:33 (external edit)