The style Property
You can use the style property to manage element styles. After style (after the dot) indicate the CSS property that needs to be changed. In order to change the style of an element, the specified property needs to be assigned a new value.
let element = document.querySelector('p');
// Assign green text for the paragraph
element.style.color = 'green';
Styles that are defined using the style property work in the same as if they were specified in the markup in the styleattribute of the element itself. They have a higher priority than CSS rules from a stylesheet.
You cannot use hyphens in property names in JavaScript. Instead, you should use CamelCase to designate the boundaries of words. For example:
CSSJavaScriptfont-sizefontSizebackground-colorbackgroundColorborder-left-widthborderLeftWidth
If we obtain data from the input field, then we use concatenation in order to assign the units of measurement:
longread.style.fontSize = sizeSetting.value + 'px';
// Suppose that the user entered the number 16
longread.style.fontSize = 16 + 'px'; // Result: '16px'
To find out which styles are already applied to an element, use the window.getComputedStyle method.
The onchange and oninput Handlers
To track changes to the input field, you can use the onchange and oninput handlers. The different between them is as follows:
- onchange is triggered if the value of the input field has changed and the user has finished entering input. For example, if the user moved the slider and released it, or they entered something a text field then moved the cursor away from it.
- oninput is triggered for every change of value regardless of whether the user finished entering text or not. For example, it is triggered for every change of position of the slider, even if the user continues to move it. Similarly, it is triggered by every new character that is entered in the text field, even if the user continues to enter text.
When we change the size of elements, the browser must redraw the page. This is a resource-intensive operation, and it should be performed as rarely as possible. Use the oninput handler carefully.
The type Property
A special password-type field is used to enter the password. One special property of this field is that the entered text is masked. Typically browsers use asterisks or circles to mask the text.
To show the password, you need to covert the password input field into a text input field. To do this, change its type to text. The type property in JavaScript is used to assign types. To change the input field type, you need to write a new value to the type property.
let input = document.querySelector('input');
// Create the text input field
input.type = 'text';
The checked Checkbox and Property
A checkbox is an input field that can have one of two states: on or off. Usually the checkmark indicates the state of the checkbox in browsers: if the checkbox is ticked, then it is checked. To track this event from the script, use the onchange event handler.
To check the state of the checkbox, use the checked property. This property has the boolean value true if the checkbox is checked and false if it is not.
// Check whether the checkbox is checked
if (showPassword.checked) {
// The instructions are executed if the checkbox is checked
} else {
// The instructions are executed if the checkbox is unchecked
}
The Comparison and Multiplication Operators
JavaScript has several comparison operators. These operators work the same way as in mathematics:
1 > 2; // "Greater than" operator
1 < 2; // "Less than" operator
1 >= 2; // "Greater than or equal to" operator
1 <= 2; // "Less than or equal to" operator
The “greater than or equal to” and “less than or equal to” operators are indicated using two characters: an angle bracket and an equal sign.
Multiplication is indicated using an asterisk in JavaScript:
console.log(3 * 10); // Outputs: 30
The else if Statement
The else if statement allows us to add an alternative branch with a condition to a conditional statement. Indicate the condition in parentheses after else if, and indicate the instructions that should be executed in curly braces if this condition returns true.
if (condition-1) {
// The instructions are executed if condition-1 is true
} else if (condition-2) {
// The instructions are executed if condition-1 is false but condition-2 is true
} else {
// The instructions are executed if both conditions are false
}
JavaScript executes instructions from top to bottom. First it will check condition-1. If it is true, the instructions from the first branch are executed. If condition-1 is false, JavaScript checks condition-2. If it is true, the instructions from the second branch are executed. If both conditions are false, then the instructions from the else branch are executed.
You can have any number of else if branches in your conditional statement. But the more you have of them, the more confusing the code is.
Continue
<!DOCTYPE html><html lang="en" class="no-js"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script>var b=document.documentElement.classList;b.remove('no-js');if(!window.Promise||!window.sessionStorage||!!sessionStorage.getItem('muller.v2')){b.add('muller')}</script><link rel="dns-prefetch" href="https://assets.htmlacademy.org"><script async src="https://www.googletagmanager.com/gtag/js?id=G-MXPCRXM48C"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MXPCRXM48C');
</script><script type="text/javascript">
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script")
;r.type="text/javascript"
;r.integrity="sha384-d/yhnowERvm+7eCU79T/bYjOiMmq4F11ElWYLmt0ktvYEVgqLDazh4+gW9CKMpYW"
;r.crossOrigin="anonymous";r.async=true
;r.src="https://cdn.amplitude.com/libs/amplitude-5.2.2-min.gz.js"
;r.onload=function(){if(!e.amplitude.runQueuedFunctions){
console.log("[Amplitude] Error: could not load SDK")}}
;var i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)
;function s(e,t){e.prototype[t]=function(){
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this}}
var o=function(){this._q=[];return this}
;var a=["add","append","clearAll","prepend","set","setOnce","unset"]
;for(var u=0;u<a.length;u++){s(o,a[u])}n.Identify=o;var c=function(){this._q=[]
;return this}
;var l=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
;for(var p=0;p<l.length;p++){s(c,l[p])}n.Revenue=c
;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
;function v(e){function t(t){e[t]=function(){
e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}
for(var n=0;n<d.length;n++){t(d[n])}}v(n);n.getInstance=function(e){
e=(!e||e.length===0?"$default_instance":e).toLowerCase()
;if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};v(n._iq[e])}return n._iq[e]}
;e.amplitude=n})(window,document);
amplitude.getInstance().init("df11525b6880a3c5e2af14f9b6238408", null,{
includeUtm: true,
includeGclid: true,
includeReferrer: true,
deviceIdFromUrlParam: true
}, function (instance) {
window.amplitudeLoaded = true;
});
</script><link rel="stylesheet" href="https://assets.htmlacademy.org/css/core.v284.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/profile.v236.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course.v246.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course-interface-light.v20.css"><link rel="stylesheet" href="https://assets.htmlacademy.org/css/course-interface-en.v2.css"><script src="https://assets.htmlacademy.org/js/sentry.js" data-sentry="3774884cc81746ed84c0ba7c5cd4ac7b" data-project="26" data-version="2"></script><link rel="stylesheet" href="/css/custom.css"><link rel="stylesheet" href="/css/cookies.css"><link rel="preload" as="script" href="https://assets.htmlacademy.org/js/general.v274.js"><title>Summary of “Dynamic element styles” — Dynamic element styles — HTML Academy</title><meta name="csrf-token" content="44564caf322823086fca37a7326b9bd2a54"><meta property="og:type" content="website"><meta property="og:site_name" content="HTML Academy"><meta name="twitter:url" property="og:url" content="https://htmlacademy.org"><meta name="twitter:title" property="og:title" content="Interactive online courses HTML Academy"><meta name="twitter:description" property="og:description" content="Together we’ll learn how to work with real code, solve true-to-life problems, use cutting edge technologies. Minimum of boring theory and lots of practical tasks."><meta name="twitter:image" property="og:image" content="https://htmlacademy.org/og/htmlacademy.png"><meta name="twitter:card" content="summary_large_image"><link rel="canonical" href="https://htmlacademy.org/courses/javascript-basics/dynamic-element-styles/summary"><meta name="theme-color" content="#2f358f"></head><body class="course-interface course-interface--light course-interface--full" data-base="/assets/courses/25/"><header class="page-header page-header--course"><div class="page-header__inner"><div class="page-header__top"><a class="page-header__logo" href="/" aria-label="HTML Academy Home"><img src="https://assets.htmlacademy.org/img/logo--small.svg?cs=1218aec0be4a5f23db79ad29a14e30f7f9fb9a25" width="24" height="36" alt="HTML Academy"></a><nav class="main-nav main-nav--mini" role="navigation"><div class="main-nav__course-nav"><a class="main-nav__course-item main-nav__course-button main-nav__course-button--prev" href="/courses/javascript-basics/dynamic-element-styles/finish-signup-page">Finishing the signup page</a><div class="main-nav__course-item main-nav__course-list main-nav__course-list--collapsed"><b class="main-nav__course-title">Dynamic element styles</b><span class="main-nav__course-stat">16/17</span><div class="main-nav__course-contents"><a class="main-nav__course-contents-link" href="/courses/javascript-basics/dynamic-element-styles">Back to the list of tasks</a><ul class="main-nav__course-contents-list"><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/style-property">1. The style property</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/set-font-color">2. Setting the font color</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/obtain-value">3. Obtaining the value from the field with the slider</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/set-font-size">4. Setting the font size</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/onchange-oninput-compare">5. Comparing onchange and oninput</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/configure-background-color">6. Configuring the background color</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/type-property">7. The type property</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/show-password">8. Using the checkbox to show the password</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/checked-property">9. The checked property</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/change-bar-length">10. Changing the bar length</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/bar-password-length">11. Tying the bar length to the password length</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/save-password-length">12. Saving the password length as a variable</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/comparison-operators">13. Comparison operators</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/else-if-statement">14. The else if statement</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/finish-signup-page">15. Finishing the signup page</a></li><li class="main-nav__course-contents-item main-nav__course-contents-item--current"><a href="/courses/javascript-basics/dynamic-element-styles/summary">16. Summary of “Dynamic element styles”</a></li><li class="main-nav__course-contents-item"><a href="/courses/javascript-basics/dynamic-element-styles/pixel-art">17. Test: Pixel art</a></li></ul></div></div><a class="main-nav__course-item main-nav__course-button main-nav__course-button--next" href="/courses/javascript-basics/dynamic-element-styles/pixel-art">Test: Pixel art</a></div><ul class="main-nav__list main-nav__list--user main-nav__list--user-guest"><li class="main-nav__item" itemprop="name"><a class="main-nav__link" href="/signup?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" title="Sign up" data-modal="open" data-value="register" itemprop="url"><span class="main-nav__icon" aria-hidden="true"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#user"></use></svg></span>Sign up</a></li><li class="main-nav__item main-nav__item--login" itemprop="name"><a class="main-nav__link" href="/login?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" title="Log in" data-modal="open" data-value="login" itemprop="url"><span class="main-nav__icon" aria-hidden="true"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#login"></use></svg></span>Log in</a></li></ul></nav></div></div></header><main class="course-container"><div class="course-theory"><div class="course-theory__inner"><section class="course-theory__content"><h1 class="course-theory__content-heading course-theory__content-heading--synopsis">Summary of “Dynamic element styles”</h1><div class="course-theory__content-text"><h2>The style Property</h2><p>You can use the <code>style</code> property to manage element styles. After <code>style</code> (after the dot) indicate the CSS property that needs to be changed. In order to change the style of an element, the specified property needs to be assigned a new value.</p><pre><code>let element = document.querySelector('p');
// Assign green text for the paragraph
element.style.<mark>color = 'green'</mark>;</code></pre><p>Styles that are defined using the <code>style</code> property work in the same as if they were specified in the markup in the <code>style</code><a href="/courses/html-css-basics/css-essentials/embedded-styles-style-attribute">attribute</a> of the element itself. They have a higher priority than CSS rules from a stylesheet.</p><p>You cannot use hyphens in property names in JavaScript. Instead, you should use <a href="/courses/javascript-basics/element-collections-properties/data-attribute-value">CamelCase</a> to designate the boundaries of words. For example:</p><table style="width: 100%; border-collapse: collapse; border:1px solid #f8f8f8; text-align: center; margin-bottom: 1.5em;"><thead><tr style="background-color: #f8f8f8; color: #333333"><th>CSS</th><th>JavaScript</th></tr></thead><tbody><tr><td>font-size</td><td>fontSize</td></tr><tr><td>background-color</td><td>backgroundColor</td></tr><tr><td>border-left-width</td><td>borderLeftWidth</td></tr></tbody></table><p>If we obtain data from the input field, then we use concatenation in order to assign the units of measurement:</p><pre><code>longread.style.fontSize = sizeSetting.value <mark>+</mark> 'px';
// Suppose that the user entered the number 16
longread.style.fontSize = 16 + 'px'; // Result: '16px'</code></pre><p>To find out which styles are already applied to an element, use the <code class="nowrap">window.getComputedStyle</code> method.</p><h2>The onchange and oninput Handlers</h2><p>To track changes to the input field, you can use the <code>onchange</code> and <code>oninput</code> handlers. The different between them is as follows:</p><ul><li><code>onchange</code> is triggered if the value of the input field has changed and the user has finished entering input. For example, if the user moved the slider and released it, or they entered something a text field then moved the cursor away from it.</li><li><code>oninput</code> is triggered for every change of value regardless of whether the user finished entering text or not. For example, it is triggered for every change of position of the slider, even if the user continues to move it. Similarly, it is triggered by every new character that is entered in the text field, even if the user continues to enter text.</li></ul><p>When we change the size of elements, the browser must redraw the page. This is a resource-intensive operation, and it should be performed as rarely as possible. Use the <code>oninput</code> handler carefully.</p><h2>The type Property</h2><p>A special <code>password</code>-type field is used to enter the password. One special property of this field is that the entered text is masked. Typically browsers use asterisks or circles to mask the text.</p><p>To show the password, you need to covert the password input field into a text input field. To do this, change its type to <code>text</code>. The <code>type</code> property in JavaScript is used to assign types. To change the input field type, you need to write a new value to the <code>type</code> property.</p><pre><code>let input = document.querySelector('input');
// Create the text input field
input.<mark>type = 'text'</mark>;</code></pre><h2>The checked Checkbox and Property</h2><p>A checkbox is an input field that can have one of two states: on or off. Usually the checkmark indicates the state of the checkbox in browsers: if the checkbox is ticked, then it is <code>checked</code>. To track this event from the script, use the <code>onchange</code> event handler.</p><p>To check the state of the checkbox, use the <code>checked</code> property. This property has the boolean value <code>true</code> if the checkbox is checked and <code>false</code> if it is not.</p><pre><code>// Check whether the checkbox is checked
if (showPassword.<mark>checked</mark>) {
// The instructions are executed if the checkbox is checked
} else {
// The instructions are executed if the checkbox is unchecked
}</code></pre><h2>The Comparison and Multiplication Operators</h2><p>JavaScript has several comparison operators. These operators work the same way as in mathematics:</p><pre><code>1 > 2; // "Greater than" operator
1 < 2; // "Less than" operator
1 >= 2; // "Greater than or equal to" operator
1 <= 2; // "Less than or equal to" operator</code></pre><p>The “greater than or equal to” and “less than or equal to” operators are indicated using two characters: an angle bracket and an equal sign.</p><p>Multiplication is indicated using an asterisk in JavaScript:</p><pre><code>console.log(3 <mark>*</mark> 10); // Outputs: 30</code></pre><h2>The else if Statement</h2><p>The <code class="nowrap">else if</code> statement allows us to add an alternative branch with a condition to a conditional statement. Indicate the condition in parentheses after <code class="nowrap">else if</code>, and indicate the instructions that should be executed in curly braces if this condition returns <code>true</code>.</p><pre><code>if (condition-1) {
// The instructions are executed if condition-1 is true
} <mark>else if</mark> (condition-2) {
// The instructions are executed if condition-1 is false but condition-2 is true
} else {
// The instructions are executed if both conditions are false
}</code></pre><p>JavaScript executes instructions from top to bottom. First it will check <code class="nowrap">condition-1</code>. If it is true, the instructions from the first branch are executed. If <code class="nowrap">condition-1</code> is false, JavaScript checks <code class="nowrap">condition-2</code>. If it is true, the instructions from the second branch are executed. If both conditions are false, then the instructions from the <code>else</code> branch are executed.</p><p>You can have any number of <code class="nowrap">else if</code> branches in your conditional statement. But the more you have of them, the more confusing the code is.</p><br><a class="button button--green button--large button--wide button--icon" href="/courses/javascript-basics/dynamic-element-styles/pixel-art"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#icon-check-bold"></use></svg>
Continue
</a></div></section></div></div><script
src="https://assets.htmlacademy.org/scripts/courses-spa/htmlacademy-task.v43.js"
data-assets-path="https://assets.htmlacademy.org/scripts/courses-spa/"
data-task-type="theory"
data-lang="en"
></script><script>HtmlacademyTask.setup(function(){});</script></main><footer class="page-footer page-footer--tiny"><div class="page-footer__inner"><p><a href="/docs/cookies">Cookies</a> ∙
<a href="/docs/privacy">Privacy</a> ∙
<a href="/docs/agreement">License Agreement</a> ∙
<a href="/docs/about">About</a> ∙
<a href="/contacts">Contacts</a> ∙
© HTML Academy OÜ, 2019−2026
</p><div class="page-footer__financial"><img src="https://assets.htmlacademy.org/img/visa-white.svg?cs=96e54ec8c587db9d4b1d8d328ffd87c2ebfd9555" alt="VISA" title="VISA" width="35" height="35"><img src="https://assets.htmlacademy.org/img/mastercard-horizontal.v2.svg" alt="Mastercard" title="Mastercard" width="35" height="35"></div></div></footer><div class="modal"><div class="modal__inner"><div class="modal__wrapper js-login hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Log in</h4><ul class="modal__social"><li class="modal__social-link modal__social-link--fb"><a href="/login/fb?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" rel="nofollow" title="Log in via Facebook"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#facebook"></use></svg></a></li><li class="modal__social-link modal__social-link--google"><a href="/login/google?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" rel="nofollow" title="Log in via Google"><svg height="30" width="30" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M457.732 216.625c2.628 14.041 4.063 28.743 4.063 44.098C461.796 380.688 381.481 466 260.204 466c-116.023 0-210-93.977-210-210s93.977-210 210-210c56.704 0 104.077 20.867 140.44 54.73l-59.204 59.197v-.135c-22.046-21.002-50-31.762-81.236-31.762-69.297 0-125.604 58.537-125.604 127.841 0 69.29 56.306 127.968 125.604 127.968 62.87 0 105.653-35.965 114.46-85.312h-114.46v-81.902h197.528z"/></svg></a></li></ul><div class="modal__or"><span>or</span></div><form class="modal__form form" action="/login?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" autocomplete="off" method="post" data-submit="o"><input type="hidden" name="csrf_name" value="csrf69aed41748794"><input type="hidden" name="csrf_value" value="996f992e4bbca4e6163bdd216a348db6"><div class="form__group"><label class="sr-only" for="login-email">Email</label><input class="field field--text field--full-width" type="email" name="email" placeholder="Email" value="" id="login-email"></div><div class="form__group"><label class="sr-only" for="login-password">Password</label><input class="field field--text field--full-width ym-disable-keys" type="password" name="password" placeholder="Password" id="login-password"></div><input class="button button--full-width" type="submit" data-submit-text="Logging in…" value="Log in"></form><p class="modal__forgot-password"><a href="/recover" data-modal="open" data-value="recover">Forgot your password?</a></p><a class="modal__bottom-link" href="/signup" data-modal="open" data-value="register">Sign up</a></div><div class="modal__wrapper js-register hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Sign up</h4><ul class="modal__social"><li class="modal__social-link modal__social-link--fb"><a href="/login/fb?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" rel="nofollow" title="Log in via Facebook"><svg aria-hidden="true"><use xlink:href="/img/sprites/general.svg#facebook"></use></svg></a></li><li class="modal__social-link modal__social-link--google"><a href="/login/google?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" rel="nofollow" title="Log in via Google"><svg height="30" width="30" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M457.732 216.625c2.628 14.041 4.063 28.743 4.063 44.098C461.796 380.688 381.481 466 260.204 466c-116.023 0-210-93.977-210-210s93.977-210 210-210c56.704 0 104.077 20.867 140.44 54.73l-59.204 59.197v-.135c-22.046-21.002-50-31.762-81.236-31.762-69.297 0-125.604 58.537-125.604 127.841 0 69.29 56.306 127.968 125.604 127.968 62.87 0 105.653-35.965 114.46-85.312h-114.46v-81.902h197.528z"/></svg></a></li></ul><div class="modal__or"><span>or</span></div><form class="modal__form form" action="/signup?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" autocomplete="off" method="post"><input type="hidden" name="csrf_name" value="csrf69aed41748794"><input type="hidden" name="csrf_value" value="996f992e4bbca4e6163bdd216a348db6"><div class="form__group"><label class="sr-only" for="email">
Email
<span class="required"><span class="sr-only">Required field</span><span class="required__star">*</span></span></label><div class="form__group-fields"><input class="field field--text field--full-width" type="email" name="email" value="" id="email" required placeholder="Email"></div></div><div class="form__group"><label class="sr-only" for="password">
Password
<span class="required"><span class="sr-only">Required field</span><span class="required__star">*</span></span></label><div class="form__group-fields"><input class="field field--text field--full-width" type="password" name="password" value="" id="password" required placeholder="Password"></div></div><div class="form__group"><label class="checkbox"><input class="checkbox__input" type="checkbox" name="agreement" value="1" required><span class="checkbox__text"><span>By signing up, you agree to our <a href="/docs/agreement" target="_blank">License Agreement</a> and <a href="/docs/privacy" target="_blank">Privacy Policy</a>.</span></span></label></div><input class="button button--full-width" type="submit" data-submit-text="Signing up…" value="Sign up"></form><a class="modal__bottom-link" href="/login?redirect_url=%2Fcourses%2Fjavascript-basics%2Fdynamic-element-styles%2Fsummary" data-modal="open" data-value="login">Log in</a></div><div class="modal__wrapper modal__wrapper--no-btn-bottom js-recover hidden"><button class="modal__close icon-close" type="button" title="Close" data-modal="close"></button><h4 class="modal__header">Restore access</h4><p class="modal__text-accent">Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.</p><form class="modal__form form" action="/recover" autocomplete="off" method="post" data-submit="o"><input type="hidden" name="csrf_name" value="csrf69aed41748794"><input type="hidden" name="csrf_value" value="996f992e4bbca4e6163bdd216a348db6"><div class="form__group"><label class="sr-only" for="recovery-email">Email</label><input class="field field--text field--full-width" type="email" name="email" placeholder="Email" value="" id="recovery-email"></div><script src='https://www.google.com/recaptcha/api.js'></script><div class="form__group"><div class="g-recaptcha" data-sitekey="6LetCTEqAAAAANROWtPzfC7Rfg9iIRiRt2k2FPn7"></div></div><input class="button button--full-width" type="submit" data-submit-text="Sending…" value="Send"></form><p class="modal__text">Forgot to connect your email to the profile? Email us and we’ll help.</p></div></div></div><script async src="https://assets.htmlacademy.org/js/general.v274.js" data-assets="https://assets.htmlacademy.org" data-require="toggle,navigation-courses,modal,form,nav"></script></body></html>