There are two confusing points that I came across to create a CSS style when I press the first time. I can label the class of strikethrough into the words. When I press the second time, the words go back to the normal. First point: I find the block" set the attribute class" and I find setting the style in the html useful for me to label the strikethrough into the word. Second point: I need to remove the label "set the attribute block" in the if-conditional block in order to remove the strikethrough label when I click the word second time. #javascript #html
CSS Strikethrough Styling Issues
More Relevant Posts
-
What if your CSS could read DOM state without a single line of JavaScript? CSS :has() makes this real. Form field highlights, tab indicators, card state variants that used to need JS class-toggling can now live entirely in your stylesheet. https://lnkd.in/eaC8d4gU #WebDev #CSS #WebPlatform
To view or add a comment, sign in
-
Default CSS list bullets can sometimes be… boring. • Same style • Same size • Same color But CSS lets you fully customize them. Using ::before pseudo-element and content property. Check out this Tailwind Demo: https://lnkd.in/d_NUB3cz #css #tailwind #webdevelopment #lists #javascript #html #tailwindcss #softwaredevelopment
To view or add a comment, sign in
-
-
𝟭𝟬 𝗦𝗶𝗺𝗽𝗹𝗲 𝗗𝗢𝗠 𝗤𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀 You need to understand the DOM for JavaScript. DOM means Document Object Model. Here are 10 basics: - Select an element by ID: document.getElementById("title") - Select elements by class: document.getElementsByClassName("item") - Find the first match: document.querySelector(".box") - Find all matches: document.querySelectorAll(".box") - Change text: element.innerText = "Hello World" - Change HTML content: element.innerHTML = "Bold Text" - Change CSS styles: element.style.color = "red" - Add a click event: element.addEventListener("click", function) - Create a new element: document.createElement("p") - Remove an element: element.remove() Source: https://lnkd.in/gUi_QG4j
To view or add a comment, sign in
-
Today's CSSBattle solution: Button Eye. https://lnkd.in/g2N5nHs9 (It's not that you can do one task faster. It's that you can do more tasks in parallel. The same one task still needs time; but do more in-between in the meantime.) #cssgang #CSS #CSSBattle #HTML
To view or add a comment, sign in
-
-
Day 2 ✅ — CSS - Styling basics. Yesterday: HTML structure. Today: CSS style. -Inline, internal, external stylesheets. -Selectors, IDs, classes, and common styling properties. -Linked JavaScript for the first time. Day 3 tomorrow. #WebDevelopment #CSS #HTML #JavaScript #FullStack #StructuralEngineering #Upskilling
To view or add a comment, sign in
-
#JavaScript Object Syntax Inline Styles in react are specified using Javascript objects. property names are written in camelCase instead of the traditional css kebab-case, const style = { backgroundColor: 'black', fontSize: '16px' }; #units For most numeric values, you need to specify units as a string (e.g., '16px'). Some propertices like zIndex, can take numeric values directly. const style = { padding : '1.6rem', zIndex: 1, };
To view or add a comment, sign in
-
Want to change text color using a class? Here's a simple example 👇 HTML: <p class="greeting">Hello Sumeet, how are you?</p> CSS: .greeting { color: blue; } 🎯 You can replace blue with any color like red, green, or even hex codes like #ff5733. #WebDevelopment #CSS #Frontend #CodingTips #Metashot
To view or add a comment, sign in
-
-
Day 14/100 of JavaScript Today’s topic : Introduction to DOM The DOM (Document Object Model) represents the HTML structure of a web page as a tree of objects JavaScript can use the DOM to access and manipulate elements dynamically 🔹Selecting elements const heading = document.getElementById("title"); const items = document.querySelectorAll(".item"); 🔹Changing content heading.textContent = "Updated Title"; 🔹Changing styles heading.style.color = "blue"; 🔹Adding elements const newEl = document.createElement("p"); newEl.textContent = "New paragraph"; document.body.appendChild(newEl); 🔑 Key understanding: The DOM allows JavaScript to interact with HTML and update the UI dynamically without reloading the page #Day14 #JavaScript #100DaysOfCode
To view or add a comment, sign in
-
Day 15 of My JavaScript Journey 🚀 Today, I was introduced to the basics of HTML. HTML (HyperText Markup Language) is used to structure the content of a web page not to style or add functionality, but to define elements like text, images, and links. I also learned about attributes, classes, and IDs. Classes and IDs are used to name elements so they can be selected in CSS for styling and in JavaScript for DOM manipulation. Key differences: • ID: It must be unique (used once per page) • Class: It's reusable (can be used multiple times) One important insight: HTML provides the structure, CSS handles the design, and JavaScript adds interactivity. Key takeaway: Understanding HTML is the foundation for building and manipulating web pages with JavaScript. #JavaScript #HTML #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
Built a simple digital clock using JavaScript’s Date object. Used basic string formatting and added AM/PM to make it more readable. Also styled it using vanilla CSS. It’s a small project, but it feels great to turn a random idea into something functional. Would love to hear your thoughts and suggestions for improvements.
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development